Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream v0.2.1 #1

Merged
merged 92 commits into from
Sep 13, 2023
Merged

Merge upstream v0.2.1 #1

merged 92 commits into from
Sep 13, 2023

Conversation

blakeatolo
Copy link

No description provided.

aermakov-zalando and others added 30 commits September 17, 2021 11:29
Fix the type for ClusterScalingScheduleList
…ule-scaling-window

Scheduled scaling: scale up/down slowly
The HPA has a feature to do not scale up and down when the change in the
metric is less than 10%:

> We'll skip scaling if the ratio is sufficiently close to 1.0 (within a
> globally-configurable tolerance, from the
> `--horizontal-pod-autoscaler-tolerance` flag, which defaults to 0.1.

It could lead to pods scaling up to 10% less than the target for
ScalingSchedules and then not scaling to the actual value if the metric
calculated before was less than 10% of the target.

This commit uses 10 fixed buckets for scaling, this way we know the
metric returned during a scaling event is at least 10% more than a
previous one calculated during the period of ramp up. The same is valid
for the scaling down during a ramp-down

Signed-off-by: Jonathan Juares Beber <[email protected]>
…ng-chunks

Use 10 buckets on ScalingSchedule ramp-up/down
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
…path-array

Handle more complex array in json path
In zalando-incubator#371 we introduced steps to make the scaling up possible even when
the HPA forces a 10% change. The problem is that 10% might not be
sufficient for some specific scaling scenarios.

For example, a an application targeting 12 pods and using a
ScalingSchedule with the value of 10000 to achieve that, will require a
target of 833. With 10 ramp steps the 90% bucket will return a metric of
9000 and the HPA calculates (9000/833) 10.8 pods, rounding to 11 pods.
Once the metric reaches the time to return 100% it will won't be
effective, since the change of the current number of pods (11) and the
desired one (12) is less than 10%.

This commit does not try to tackle this problem completely, since the
10% rule is not fixed, might change among different clusters and is also
dependent on the value given to each ScalingSchedule. Therefore, this
commit makes the number of ramp steps configurable via the
`--scaling-schedule-ramp-steps` config flag, defaulting to 10.

Signed-off-by: Jonathan Juares Beber <[email protected]>
…gurable-buckets

Make the number of ramp steps configurable
This commit upgrades all the Kubernetes dependencies to 1.21.5. It
includes regenerated clients and specs.

Signed-off-by: Jonathan Juares Beber <[email protected]>
The current implementation of the metrics store for custom metrics uses
just the object name as key. When scenarios where two HPAs reference the
same object but have different metric calculation (e.g. ingresses with
different weights), kube-metrics-adapter calculates the two metrics but
always overrides one of the metrics when saving it to the store.

This commit implements the use of a labels hash in the custom metrics
store. This way, metrics are identified not just by the referenced
object, but also by its selectors.

Co-authored-by: Katyanna Moura <[email protected]>
Signed-off-by: Jonathan Juares Beber <[email protected]>
The metrics store, both the custom and external one, make heavy usage of
maps of strings to strings. This leads to a presumable confusing or at
least hard to read codebase.

This commit tries to increase readability and maintainability of the
metric stores by using custom types. This commit has no effect in
performance or functionality, it's pure aesthetics.

Co-authored-by: Jonathan Juares Beber <[email protected]>
Signed-off-by: Katyanna Moura <[email protected]>
…mmetricsselector

Use labels hash in the custom metrics store and metrics store 💅
Having the test filename prefix exactly as the tested file name helps systems
to identify the correlation.

Signed-off-by: Katyanna Moura <[email protected]>
Bug was introduced trying to solved the following issue:
> When scenarios where two HPAs reference the same object but have
different metric calculation (e.g. ingresses with different weights),
kube-metrics-adapter calculates the two metrics but always overrides
one of the metrics when saving it to the store.

This commit fixes a issue where without the added `return` the system
was continuing in an invalid states where `labels2metric` wasn't
properly initialized, causing the system to panic.

Signed-off-by: Katyanna Moura <[email protected]>
…etrics-map

Fix panic when trying to add key to nil map
* Update example

Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>

* Update dependencies 2022-02

Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
…dAnnotations to helm chart (zalando-incubator#421)

Signed-off-by: Olivier Schiavo <[email protected]>

Co-authored-by: Olivier Schiavo <[email protected]>
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
…e-deps-2022-06

Update dependencies + fix CI build
Given the deprecation of extensions/v1beta1, remove it from Ingress possibilities.

Signed-off-by: Katyanna Moura <[email protected]>
…ss-upgrade-v1

Limit ingress support to only networking.k8s.io/v1
lucastt and others added 23 commits May 23, 2023 15:46
Signed-off-by: Lucas Thiesen <[email protected]>
Signed-off-by: Lucas Thiesen <[email protected]>
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
…ame-rps-collector

Add hostname RPS metric collector
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
```
codespell --skip .git | less
```

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

Signed-off-by: Alexander Yastrebov <[email protected]>
…codespell-typos

all: fix typos discovered by codespell
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
…e-golangci-lint-cfg

Update golangci-lint config
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.299 to 1.44.313.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.299...v1.44.313)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/spyzhov/ajson](https://github.com/spyzhov/ajson) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/spyzhov/ajson/releases)
- [Commits](spyzhov/ajson@v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/spyzhov/ajson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…dabot/go_modules/github.com/aws/aws-sdk-go-1.44.313

Bump github.com/aws/aws-sdk-go from 1.44.299 to 1.44.313
…dabot/go_modules/github.com/spyzhov/ajson-0.9.0

Bump github.com/spyzhov/ajson from 0.8.0 to 0.9.0
@blakeatolo blakeatolo marked this pull request as draft September 12, 2023 19:50
@blakeatolo blakeatolo marked this pull request as ready for review September 13, 2023 19:47
@blakeatolo blakeatolo self-assigned this Sep 13, 2023
@blakeatolo blakeatolo merged commit 8bbf8f0 into master Sep 13, 2023
2 of 5 checks passed
@blakeatolo blakeatolo deleted the batkins/upstream_merge branch September 13, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.