forked from zalando-incubator/kube-metrics-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Alexey Ermakov <[email protected]>
Fix the type for ClusterScalingScheduleList
Signed-off-by: Alexey Ermakov <[email protected]>
…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]>
Upgrade Kubernetes and its friends to 1.21
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]>
…e-deps-02-14 Update dependencies
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
Signed-off-by: Sandor Szücs <[email protected]>
Given the deprecation of extensions/v1beta1, remove it from Ingress possibilities. Signed-off-by: Katyanna Moura <[email protected]>
Signed-off-by: Katyanna Moura <[email protected]>
…ss-upgrade-v1 Limit ingress support to only networking.k8s.io/v1
Signed-off-by: Lucas Thiesen <[email protected]>
Signed-off-by: Lucas Thiesen <[email protected]>
Signed-off-by: Lucas Thiesen <[email protected]>
Signed-off-by: Lucas Thiesen <[email protected]>
Signed-off-by: Lucas Thiesen <[email protected]>
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]>
…e-deps-2023-06-01 Update dependencies
``` 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]>
…e-deps-2023-07-13 Update dependencies
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
olobrian
approved these changes
Sep 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.