Skip to content

Commit

Permalink
all: fix typos discovered by codespell (#496)
Browse files Browse the repository at this point in the history
```
codespell --skip .git | less
```

See https://github.com/codespell-project/codespell

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
  • Loading branch information
AlexanderYastrebov authored Jun 12, 2023
1 parent 88663bc commit 5d0741f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ behavior for the `StackSet`:

* [How To's](/docs/howtos.md)

### Kubernetes Compatibilty
### Kubernetes Compatibility

The StackSet controller works with Kubernetes `>=v1.23`.

Expand Down
6 changes: 3 additions & 3 deletions docs/howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ one port of the containers must have the same name or port number as the
### Configure custom service ports

In some cases you want to expose multiple ports in your service. For this use
case it's posible to define the service ports on the `StackSet`.
case it's possible to define the service ports on the `StackSet`.

```yaml
apiVersion: zalando.org/v1
Expand Down Expand Up @@ -207,7 +207,7 @@ autoscaler:
Here the stackset would be scaled based on the length of the Amazon SQS Queue size so that there are no more
than 30 items in the queue per pod. Also the autoscaler tries to keep the CPU usage below 80% in the pods by
scaling. If multiple metrics are specified then the HPA calculates the number of pods required per metrics
and uses the higest recommendation.
and uses the highest recommendation.

JSON metrics exposed by the pods are also supported. Here's an example where the pods expose metrics in
JSON format on the `/metrics` endpoint on port 9090. The key for the metrics should be specified as well.
Expand Down Expand Up @@ -326,7 +326,7 @@ spec:
The pre scaling works as follows:

1. User directs/increases traffic to a stack.
2. Before the stack gets any traffic it will caculate a prescale value `n` of
2. Before the stack gets any traffic it will calculate a prescale value `n` of
replicas based on the sum of all stacks currently getting traffic.
3. The HPA of the stack will get the `MinReplicas` value set equal to the
prescale value calculated in 2.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/zalando.org/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (o *StackIngressRouteGroupOverrides) IsEnabled() bool {
return *o.Enabled
}

// StackSetIngressSpec is the ingress defintion of an StackSet. This
// StackSetIngressSpec is the ingress definition of an StackSet. This
// includes ingress annotations and a list of hostnames.
// +k8s:deepcopy-gen=true
type StackSetIngressSpec struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/core/stackset.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (ssc *StackSetContainer) MarkExpiredStacks() {
return
}

// sort condidates by when they last had traffic.
// sort candidates by when they last had traffic.
sort.Slice(gcCandidates, func(i, j int) bool {
// First check if NoTrafficSince is set. If not, fall back to the creation timestamp
iTime := gcCandidates[i].noTrafficSince
Expand Down
2 changes: 1 addition & 1 deletion pkg/core/traffic.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func normalizeWeights(backendWeights map[string]float64) {
//
// The function assumes that the weights are already normalized to a sum of
// 100.
// It's using the "Largets Remainder Method" for rounding:
// It's using the "Largest Remainder Method" for rounding:
// https://en.wikipedia.org/wiki/Largest_remainder_method
func roundWeights(weights map[string]float64) {
type backendWeight struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/core/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const (
)

// StackSetContainer is a container for storing the full state of a StackSet
// including the sub-resources which are part of the StackSet. It respresents a
// including the sub-resources which are part of the StackSet. It represents a
// snapshot of the resources currently in the Cluster. This includes an
// optional Ingress resource as well as the current Traffic distribution. It
// also contains a set of StackContainers which respresents the full state of
// also contains a set of StackContainers which represents the full state of
// the individual Stacks part of the StackSet.
type StackSetContainer struct {
StackSet *zv1.StackSet
Expand Down Expand Up @@ -140,7 +140,7 @@ func (sc *StackContainer) HasTraffic() bool {
}

func (sc *StackContainer) IsReady() bool {
// Calculate minmum required replicas for the Deployment to be considered ready
// Calculate minimum required replicas for the Deployment to be considered ready
minRequiredReplicas := int32(math.Ceil(float64(sc.deploymentReplicas) * sc.minReadyPercent))

// Stacks are considered ready when all subresources have been updated
Expand Down

0 comments on commit 5d0741f

Please sign in to comment.