356 Commits

Author SHA1 Message Date
Mikkel Oscar Lyderik Larsen
b631a4fe08
Update dependencies (#548)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-04-03 10:03:24 +02:00
Mikkel Oscar Lyderik Larsen
90fea54307
Merge pull request #539 from zalando-incubator/chart-release
added chart release workflow
2023-03-16 13:39:11 +01:00
Sebastien THOMAS
8b6a54627d added chart release workflow
Signed-off-by: Sebastien THOMAS <sebastien.thomas@wunderkind.co>
2023-03-13 22:45:37 +01:00
Martin Linkhorst
75738f1eb7
Merge pull request #538 from zalando-incubator/update-deps-2023-03-01
Update dependencies
2023-03-01 13:59:48 +01:00
Mikkel Oscar Lyderik Larsen
d8934ebbc1 Update dependencies
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-03-01 13:26:19 +01:00
Rodrigo Reis
17bef811f3
Merge pull request #528 from zalando-incubator/dependabot/go_modules/github.com/emicklei/go-restful-2.16.0incompatible
Bump github.com/emicklei/go-restful from 2.15.0+incompatible to 2.16.0+incompatible
2023-02-09 17:44:13 +01:00
dependabot[bot]
7a041c991a
Bump github.com/emicklei/go-restful
Bumps [github.com/emicklei/go-restful](https://github.com/emicklei/go-restful) from 2.15.0+incompatible to 2.16.0+incompatible.
- [Release notes](https://github.com/emicklei/go-restful/releases)
- [Changelog](https://github.com/emicklei/go-restful/blob/v3/CHANGES.md)
- [Commits](https://github.com/emicklei/go-restful/compare/v2.15.0...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/emicklei/go-restful
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 16:00:27 +00:00
Katyanna Moura
979ae68eab
Merge pull request #527 from zalando-incubator/update-deps-2023-02-01
Update dependencies
2023-02-01 15:51:19 +01:00
Mikkel Oscar Lyderik Larsen
e9a209aa31 Update dependencies
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-02-01 15:25:58 +01:00
Mikkel Oscar Lyderik Larsen
838edd9082
Update dependencies 2023-01-02 (#516)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-01-02 18:13:28 +01:00
Zak Lawrence A
c50d9ccd18
Merge pull request #506 from zalando-incubator/fix-null-pointer
Fix nil pointer dereference
2022-12-21 15:48:01 +01:00
zlawrence
c60253e90c
add test for end date in incorrect format
Signed-off-by: zlawrence <zak.lawrence@zalando.de>
2022-12-21 14:08:44 +01:00
zlawrence
680e0feea1
fix nil pointer dereference
Signed-off-by: zlawrence <zak.lawrence@zalando.de>
2022-12-21 14:08:41 +01:00
Zak Lawrence A
070f9ab299
Merge pull request #505 from zalando-incubator/update-scalingschedule-config
Update scalingschedule config
2022-12-13 20:24:01 +01:00
zlawrence
8ba4d19c35
Add end date support for Repeating schedule. Added tests 2022-12-13 12:53:05 +01:00
zlawrence
37bf73c7fe
Add end date support for OneTime schedule 2022-12-12 20:02:15 +01:00
Martin Linkhorst
d01a3f6347
Merge pull request #496 from zalando-incubator/update-deps-2022-11-01
Update dependencies
2022-12-01 13:48:01 +01:00
Mikkel Oscar Lyderik Larsen
50633ba06c Update deps 2022-12
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-12-01 13:05:51 +01:00
Mikkel Oscar Lyderik Larsen
bce27b748c Update dependencies
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-11-01 08:58:12 +01:00
Katyanna Moura
9e057c1075
Merge pull request #471 from zalando-incubator/update-deps-09-2022
Update dependencies and Go version
2022-09-14 18:12:22 +02:00
Mikkel Oscar Lyderik Larsen
55ce2d8c3d Update dependencies
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-09-13 23:21:39 +02:00
Mikkel Oscar Lyderik Larsen
37969486fe
Merge pull request #448 from zalando-incubator/multi-arch-image
Build multi-arch image
2022-06-28 11:52:25 +02:00
Mikkel Oscar Lyderik Larsen
1be6357c8e Build multi-arch image
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-06-24 23:34:31 +02:00
Katyanna Moura
7b592c6832
Merge pull request #447 from zalando-incubator/ingress-upgrade-v1
Limit ingress support to only networking.k8s.io/v1
v0.1.19
2022-06-22 11:12:21 +02:00
Katyanna Moura
203aaeafb9 Update supported K8s version for skipper-collector
Signed-off-by: Katyanna Moura <amelie.kn@gmail.com>
2022-06-22 10:27:35 +02:00
Katyanna Moura
5926f1aea1 Limit ingress support to only networking.k8s.io/v1
Given the deprecation of extensions/v1beta1, remove it from Ingress possibilities.

Signed-off-by: Katyanna Moura <amelie.kn@gmail.com>
2022-06-21 12:46:08 +02:00
Sandor Szücs
be1e1c635d
Create codeql-analysis.yml (#446)
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2022-06-09 11:52:46 +02:00
Mikkel Oscar Lyderik Larsen
094a9f9b9d
Merge pull request #443 from zalando-incubator/update-deps-2022-06
Update dependencies + fix CI build
2022-06-01 16:03:37 +02:00
Mikkel Oscar Lyderik Larsen
47d34b328c Update dependencies + fix CI build
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-06-01 12:16:11 +02:00
owengo
4b5b96084b
adding nodeSelector + tolerations + affinity + priorityClassName + podAnnotations to helm chart (#421)
Signed-off-by: Olivier Schiavo <olivier.schiavo@wengo.com>

Co-authored-by: Olivier Schiavo <olivier.schiavo@wengo.com>
2022-05-02 16:02:24 +02:00
Mikkel Oscar Lyderik Larsen
18f4c82f07
Update dependencies and default to Go 1.18 (#419)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-05-02 15:57:34 +02:00
Mikkel Oscar Lyderik Larsen
10dc42b9e9
Merge pull request #401 from zalando-incubator/update-deps-02-14
Update dependencies
v0.1.18
2022-02-14 15:05:19 +01:00
Mikkel Oscar Lyderik Larsen
20db592a62
Use cdp-runtime for build (#398)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-02-14 14:41:57 +01:00
Mikkel Oscar Lyderik Larsen
d0a3ea1934
Update dependencies
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-02-14 14:36:06 +01:00
Mikkel Oscar Lyderik Larsen
837e7b9c5d
Update deps 2022 02 (#391)
* Update example

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Update dependencies 2022-02

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2022-02-01 18:13:48 +01:00
Katyanna Moura
9d8359b580
Merge pull request #380 from zalando-incubator/fix-metrics-map
Fix panic when trying to add key to nil map
2022-01-12 11:36:53 +01:00
Katyanna Moura
71a8e99d1f Fix panic when trying to add key to nil map
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 <amelie.kn@gmail.com>
2022-01-12 11:29:38 +01:00
Katyanna Moura
4d4c70c553 Fix test filename to match related file
Having the test filename prefix exactly as the tested file name helps systems
to identify the correlation.

Signed-off-by: Katyanna Moura <amelie.kn@gmail.com>
2022-01-12 11:29:38 +01:00
Katyanna Moura
2ccd6903d9
Merge pull request #376 from zalando-incubator/custommetricsselector
Use labels hash in the custom metrics store and metrics store 💅
2021-11-25 10:24:44 +01:00
Jonathan Juares Beber
f58db31f98 Define stronger types for metrics store
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 <jonathanbeber@gmail.com>
Signed-off-by: Katyanna Moura <amelie.kn@gmail.com>
2021-11-24 17:41:03 +01:00
Jonathan Juares Beber
0bf8f5dd0f
Use labels hash in the custom metrics store
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 <amelie.kn@gmail.com>
Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-11-23 18:11:18 +01:00
Jonathan Juares Beber
e600557636
Merge pull request #375 from zalando-incubator/kube1.21
Upgrade Kubernetes and its friends to 1.21
v0.1.17
2021-10-28 10:35:11 +02:00
Jonathan Juares Beber
0f06db7cdf
Upgrade Kubernetes and its friends to 1.21
This commit upgrades all the Kubernetes dependencies to 1.21.5. It
includes regenerated clients and specs.

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-10-27 20:58:18 +02:00
Jonathan Juares Beber
1c9038b2cc
Merge pull request #374 from zalando-incubator/configurable-buckets
Make the number of ramp steps configurable
v0.1.16
2021-10-25 10:21:32 +02:00
Jonathan Juares Beber
fd4ead837e
Make the number of ramp steps configurable
In #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 <jonathanbeber@gmail.com>
2021-10-22 15:35:11 +02:00
Mikkel Oscar Lyderik Larsen
f46f801811
Merge pull request #373 from zalando-incubator/json-path-array
Handle more complex array in json path
2021-10-19 10:04:04 +02:00
Mikkel Oscar Lyderik Larsen
4acdf72ef7
Handle more complex array in json path
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2021-10-14 09:34:15 +02:00
Jonathan Juares Beber
e04cd10bfc
Merge pull request #371 from zalando-incubator/scaling-chunks
Use 10 buckets on ScalingSchedule ramp-up/down
v0.1.15
2021-10-01 10:39:57 +02:00
Jonathan Juares Beber
8fe330941a
Use 10 buckets on ScalingSchedule ramp-up/down
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 <jonathanbeber@gmail.com>
2021-09-30 19:01:59 +02:00
aermakov-zalando
0730c6ef1e
Merge pull request #370 from zalando-incubator/schedule-scaling-window
Scheduled scaling: scale up/down slowly
v0.1.14
2021-09-24 15:47:44 +02:00