Compare commits

...

15 Commits

Author SHA1 Message Date
Mikkel Oscar Lyderik Larsen 19b1706f6c Enrich GetMetrics errors with metric identifier
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2025-12-18 11:46:42 +01:00
Angel Alonso 335dc1ff56 Expose KubeClient QPS and Burst configs (#853)
Signed-off-by: Angel Alonso <angel.alonso@automattic.com>
2025-12-15 13:52:22 +01:00
dependabot[bot] 23f65af774 Bump the all-go-mod-patch-and-minor group across 1 directory with 11 updates (#850)
Bumps the all-go-mod-patch-and-minor group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.39.2` | `1.40.0` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.31.12` | `1.32.2` |
| [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) | `1.42.8` | `1.42.17` |
| [github.com/prometheus/common](https://github.com/prometheus/common) | `0.67.1` | `0.67.4` |
| [golang.org/x/oauth2](https://github.com/golang/oauth2) | `0.32.0` | `0.33.0` |
| [k8s.io/api](https://github.com/kubernetes/api) | `0.34.1` | `0.34.2` |
| [k8s.io/apiserver](https://github.com/kubernetes/apiserver) | `0.34.1` | `0.34.2` |
| [k8s.io/metrics](https://github.com/kubernetes/metrics) | `0.33.5` | `0.33.6` |



Updates `github.com/aws/aws-sdk-go-v2` from 1.39.2 to 1.40.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.39.2...v1.40.0)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.31.12 to 1.32.2
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.31.12...v1.32.2)

Updates `github.com/aws/aws-sdk-go-v2/service/sqs` from 1.42.8 to 1.42.17
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ivs/v1.42.8...service/sqs/v1.42.17)

Updates `github.com/prometheus/common` from 0.67.1 to 0.67.4
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/common/compare/v0.67.1...v0.67.4)

Updates `golang.org/x/oauth2` from 0.32.0 to 0.33.0
- [Commits](https://github.com/golang/oauth2/compare/v0.32.0...v0.33.0)

Updates `k8s.io/api` from 0.34.1 to 0.34.2
- [Commits](https://github.com/kubernetes/api/compare/v0.34.1...v0.34.2)

Updates `k8s.io/apimachinery` from 0.34.1 to 0.34.2
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.34.1...v0.34.2)

Updates `k8s.io/apiserver` from 0.34.1 to 0.34.2
- [Commits](https://github.com/kubernetes/apiserver/compare/v0.34.1...v0.34.2)

Updates `k8s.io/client-go` from 0.34.1 to 0.34.2
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.34.1...v0.34.2)

Updates `k8s.io/component-base` from 0.34.1 to 0.34.2
- [Commits](https://github.com/kubernetes/component-base/compare/v0.34.1...v0.34.2)

Updates `k8s.io/metrics` from 0.33.5 to 0.33.6
- [Commits](https://github.com/kubernetes/metrics/compare/v0.33.5...v0.33.6)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sqs
  dependency-version: 1.42.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/prometheus/common
  dependency-version: 0.67.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: golang.org/x/oauth2
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/api
  dependency-version: 0.34.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.34.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/apiserver
  dependency-version: 0.34.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/client-go
  dependency-version: 0.34.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/component-base
  dependency-version: 0.34.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/metrics
  dependency-version: 0.33.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 12:03:36 +01:00
dependabot[bot] a0263ae7f9 Bump golang.org/x/crypto from 0.43.0 to 0.45.0 (#844)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.43.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.43.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 09:08:42 +01:00
Mikkel Oscar Lyderik Larsen 90a0e28490 scheduled-scaling: Handle mili values (fractions) in target value (#846)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2025-12-02 09:06:15 +01:00
dependabot[bot] 724a613dda Bump the github-actions group with 4 updates (#849)
Bumps the github-actions group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-go](https://github.com/actions/setup-go), [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) and [docker/metadata-action](https://github.com/docker/metadata-action).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

Updates `actions/setup-go` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v6...v6.1.0)

Updates `docker/setup-qemu-action` from 3.6.0 to 3.7.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/29109295f81e9208d7d86ff1c6c12d2833863392...c7c53464625b32c7a7e944ae62b3e17d2b600130)

Updates `docker/metadata-action` from 5.8.0 to 5.10.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/c1e51972afc2121e065aed6d45c65596fe445f3f...c299e40c65443455700f0fdfc63efafe5b349051)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-go
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: docker/setup-qemu-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: docker/metadata-action
  dependency-version: 5.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 10:43:50 +01:00
Mikkel Oscar Lyderik Larsen 33db2b700c Use stdlib context package (#847) 2025-11-27 13:34:22 +01:00
dependabot[bot] 4bde6c3b98 Bump github/codeql-action from 3 to 4 in the github-actions group (#840) 2025-11-01 20:44:05 +01:00
Martin Linkhorst f295dfa4b6 Merge pull request #835 from zalando-incubator/dependabot/github_actions/github-actions-457c2bfbc2
Bump docker/login-action from 3.5.0 to 3.6.0 in the github-actions group
2025-10-31 10:28:12 +01:00
Martin Linkhorst b9a1cf9a26 Merge pull request #837 from zalando-incubator/dependabot/go_modules/all-go-mod-patch-and-minor-d105dbe417
Bump the all-go-mod-patch-and-minor group across 1 directory with 7 updates
2025-10-31 10:27:53 +01:00
Katyanna Moura adba88129b Merge pull request #839 from zalando-incubator/go-tool-1.24
Run code gen via Go 1.24 go tool
2025-10-29 13:10:57 +01:00
Mikkel Oscar Lyderik Larsen 0a6f40369b Run code gen via Go 1.24 go tool
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2025-10-29 08:52:17 +01:00
dependabot[bot] e263f964e9 Bump the all-go-mod-patch-and-minor group across 1 directory with 7 updates
Bumps the all-go-mod-patch-and-minor group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.39.0` | `1.39.2` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.31.8` | `1.31.12` |
| [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) | `1.42.5` | `1.42.8` |
| [github.com/prometheus/common](https://github.com/prometheus/common) | `0.66.1` | `0.67.1` |
| [github.com/szuecs/routegroup-client](https://github.com/szuecs/routegroup-client) | `0.28.2` | `0.34.1` |
| [golang.org/x/net](https://github.com/golang/net) | `0.44.0` | `0.46.0` |
| [golang.org/x/oauth2](https://github.com/golang/oauth2) | `0.31.0` | `0.32.0` |



Updates `github.com/aws/aws-sdk-go-v2` from 1.39.0 to 1.39.2
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.39.0...v1.39.2)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.31.8 to 1.31.12
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.31.8...config/v1.31.12)

Updates `github.com/aws/aws-sdk-go-v2/service/sqs` from 1.42.5 to 1.42.8
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/sqs/v1.42.5...service/ivs/v1.42.8)

Updates `github.com/prometheus/common` from 0.66.1 to 0.67.1
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/common/compare/v0.66.1...v0.67.1)

Updates `github.com/szuecs/routegroup-client` from 0.28.2 to 0.34.1
- [Release notes](https://github.com/szuecs/routegroup-client/releases)
- [Commits](https://github.com/szuecs/routegroup-client/compare/v0.28.2...v0.34.1)

Updates `golang.org/x/net` from 0.44.0 to 0.46.0
- [Commits](https://github.com/golang/net/compare/v0.44.0...v0.46.0)

Updates `golang.org/x/oauth2` from 0.31.0 to 0.32.0
- [Commits](https://github.com/golang/oauth2/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.39.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.31.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sqs
  dependency-version: 1.42.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/prometheus/common
  dependency-version: 0.67.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/szuecs/routegroup-client
  dependency-version: 0.34.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: golang.org/x/net
  dependency-version: 0.46.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: golang.org/x/oauth2
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 06:04:53 +00:00
dependabot[bot] 88d8843e96 Bump docker/login-action from 3.5.0 to 3.6.0 in the github-actions group
Bumps the github-actions group with 1 update: [docker/login-action](https://github.com/docker/login-action).


Updates `docker/login-action` from 3.5.0 to 3.6.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/184bdaa0721073962dff0199f1fb9940f07167d1...5e57cd118135c172c3672efd75eb46360885c0ef)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 06:28:28 +00:00
dependabot[bot] ef298ca774 Bump the all-go-mod-patch-and-minor group with 10 updates (#832)
Bumps the all-go-mod-patch-and-minor group with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.38.3` | `1.39.0` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.31.6` | `1.31.8` |
| [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) | `1.42.3` | `1.42.5` |
| [k8s.io/api](https://github.com/kubernetes/api) | `0.34.0` | `0.34.1` |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.34.0` | `0.34.1` |
| [k8s.io/apiserver](https://github.com/kubernetes/apiserver) | `0.34.0` | `0.34.1` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.34.0` | `0.34.1` |
| [k8s.io/code-generator](https://github.com/kubernetes/code-generator) | `0.34.0` | `0.34.1` |
| [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.34.0` | `0.34.1` |
| [k8s.io/metrics](https://github.com/kubernetes/metrics) | `0.33.1` | `0.33.5` |


Updates `github.com/aws/aws-sdk-go-v2` from 1.38.3 to 1.39.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.38.3...v1.39.0)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.31.6 to 1.31.8
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.31.6...config/v1.31.8)

Updates `github.com/aws/aws-sdk-go-v2/service/sqs` from 1.42.3 to 1.42.5
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/sqs/v1.42.3...service/eks/v1.42.5)

Updates `k8s.io/api` from 0.34.0 to 0.34.1
- [Commits](https://github.com/kubernetes/api/compare/v0.34.0...v0.34.1)

Updates `k8s.io/apimachinery` from 0.34.0 to 0.34.1
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.34.0...v0.34.1)

Updates `k8s.io/apiserver` from 0.34.0 to 0.34.1
- [Commits](https://github.com/kubernetes/apiserver/compare/v0.34.0...v0.34.1)

Updates `k8s.io/client-go` from 0.34.0 to 0.34.1
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.34.0...v0.34.1)

Updates `k8s.io/code-generator` from 0.34.0 to 0.34.1
- [Commits](https://github.com/kubernetes/code-generator/compare/v0.34.0...v0.34.1)

Updates `k8s.io/component-base` from 0.34.0 to 0.34.1
- [Commits](https://github.com/kubernetes/component-base/compare/v0.34.0...v0.34.1)

Updates `k8s.io/metrics` from 0.33.1 to 0.33.5
- [Commits](https://github.com/kubernetes/metrics/compare/v0.33.1...v0.33.5)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.31.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sqs
  dependency-version: 1.42.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/api
  dependency-version: 0.34.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.34.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/apiserver
  dependency-version: 0.34.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/client-go
  dependency-version: 0.34.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/code-generator
  dependency-version: 0.34.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/component-base
  dependency-version: 0.34.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: k8s.io/metrics
  dependency-version: 0.33.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 11:24:27 +02:00
18 changed files with 208 additions and 409 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6.0.0
- uses: actions/checkout@v6
- uses: actions/setup-go@v6.1.0
with:
go-version: '^1.25'
- run: go version
+5 -5
View File
@@ -38,16 +38,16 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: setup go
uses: actions/setup-go@v6.0.0
uses: actions/setup-go@v6.1.0
with:
go-version: '1.25'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -61,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -74,4 +74,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
+6 -6
View File
@@ -25,15 +25,15 @@ jobs:
packages: write # to push packages
steps:
- name: Checkout
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c
with:
# https://www.npmjs.com/package/semver#caret-ranges-123-025-004
go-version: '^1.25'
- name: Login to Github Container Registry
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@@ -47,21 +47,21 @@ jobs:
make build.linux.amd64 build.linux.arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
+2 -2
View File
@@ -34,12 +34,12 @@ $(GENERATED): go.mod $(CRD_TYPE_SOURCE) $(OPENAPI)
./hack/update-codegen.sh
$(GENERATED_CRDS): $(GENERATED) $(CRD_SOURCES)
go run sigs.k8s.io/controller-tools/cmd/controller-gen crd:crdVersions=v1 paths=./pkg/apis/... output:crd:dir=docs
go tool controller-gen crd:crdVersions=v1 paths=./pkg/apis/... output:crd:dir=docs
mv docs/zalando.org_clusterscalingschedules.yaml docs/cluster_scaling_schedules_crd.yaml
mv docs/zalando.org_scalingschedules.yaml docs/scaling_schedules_crd.yaml
$(OPENAPI): go.mod
go run k8s.io/kube-openapi/cmd/openapi-gen \
go tool openapi-gen \
--go-header-file hack/boilerplate.go.txt \
--logtostderr \
--output-dir pkg/api/generated/openapi \
+48 -36
View File
@@ -2,32 +2,29 @@ module github.com/zalando-incubator/kube-metrics-adapter
require (
github.com/argoproj/argo-rollouts v1.8.3
github.com/aws/aws-sdk-go-v2 v1.38.3
github.com/aws/aws-sdk-go-v2/config v1.31.6
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.3
github.com/aws/aws-sdk-go-v2 v1.40.0
github.com/aws/aws-sdk-go-v2/config v1.32.2
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.17
github.com/influxdata/influxdb-client-go v1.4.0
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/common v0.66.1
github.com/prometheus/common v0.67.4
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.10.1
github.com/spyzhov/ajson v0.9.6
github.com/stretchr/testify v1.11.1
github.com/szuecs/routegroup-client v0.28.2
github.com/szuecs/routegroup-client v0.34.1
github.com/zalando-incubator/cluster-lifecycle-manager v0.0.0-20250912104308-4489de744ee3
golang.org/x/net v0.44.0
golang.org/x/oauth2 v0.31.0
golang.org/x/sync v0.17.0
k8s.io/api v0.34.0
k8s.io/apimachinery v0.34.0
k8s.io/apiserver v0.34.0
k8s.io/client-go v0.34.0
k8s.io/code-generator v0.34.0
k8s.io/component-base v0.34.0
golang.org/x/oauth2 v0.33.0
golang.org/x/sync v0.18.0
k8s.io/api v0.34.2
k8s.io/apimachinery v0.34.2
k8s.io/apiserver v0.34.2
k8s.io/client-go v0.34.2
k8s.io/component-base v0.34.2
k8s.io/klog v1.0.0
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b
k8s.io/metrics v0.33.1
k8s.io/metrics v0.33.6
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
sigs.k8s.io/controller-tools v0.19.0
sigs.k8s.io/custom-metrics-apiserver v1.33.0
)
@@ -42,17 +39,18 @@ require (
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.18.10 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.38.2 // indirect
github.com/aws/smithy-go v1.23.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.2 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.2 // indirect
github.com/aws/smithy-go v1.23.2 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
@@ -170,23 +168,25 @@ require (
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.35.0 // indirect
golang.org/x/text v0.29.0 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/term v0.37.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/time v0.11.0 // indirect
golang.org/x/tools v0.37.0 // indirect
golang.org/x/tools v0.38.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/grpc v1.72.1 // indirect
google.golang.org/protobuf v1.36.8 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
@@ -194,14 +194,26 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.34.0 // indirect
k8s.io/code-generator v0.34.1 // indirect
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kms v0.34.0 // indirect
k8s.io/kms v0.34.2 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
sigs.k8s.io/controller-tools v0.19.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
tool (
k8s.io/code-generator
k8s.io/code-generator/cmd/client-gen
k8s.io/code-generator/cmd/deepcopy-gen
k8s.io/code-generator/cmd/informer-gen
k8s.io/code-generator/cmd/lister-gen
k8s.io/kube-openapi/cmd/openapi-gen
sigs.k8s.io/controller-tools/cmd/controller-gen
)
go 1.24.2
+78 -311
View File
File diff suppressed because it is too large Load Diff
-23
View File
@@ -1,23 +0,0 @@
// +build tools
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
package tools
import (
_ "k8s.io/code-generator"
_ "k8s.io/kube-openapi/cmd/openapi-gen"
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
)
+4 -4
View File
@@ -31,14 +31,14 @@ APIS_PKG="${GOPKG}/pkg/apis"
GROUPS_WITH_VERSIONS="${CUSTOM_RESOURCE_NAME}:${CUSTOM_RESOURCE_VERSION}"
echo "Generating deepcopy funcs"
go run k8s.io/code-generator/cmd/deepcopy-gen \
go tool deepcopy-gen \
--output-file zz_generated.deepcopy.go \
--bounding-dirs "${APIS_PKG}" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
"${APIS_PKG}/${CUSTOM_RESOURCE_NAME}/${CUSTOM_RESOURCE_VERSION}"
echo "Generating clientset for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/${CLIENTSET_PKG_NAME:-clientset}"
go run k8s.io/code-generator/cmd/client-gen \
go tool client-gen \
--clientset-name versioned \
--input-base "" \
--input "${APIS_PKG}/${CUSTOM_RESOURCE_NAME}/${CUSTOM_RESOURCE_VERSION}" \
@@ -47,14 +47,14 @@ go run k8s.io/code-generator/cmd/client-gen \
--output-dir "${OUTPUT_DIR}/clientset"
echo "Generating listers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/listers"
go run k8s.io/code-generator/cmd/lister-gen \
go tool lister-gen \
--output-pkg "${OUTPUT_PKG}/listers" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
--output-dir "${OUTPUT_DIR}/listers" \
"${APIS_PKG}/${CUSTOM_RESOURCE_NAME}/${CUSTOM_RESOURCE_VERSION}"
echo "Generating informers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/informers"
go run k8s.io/code-generator/cmd/informer-gen \
go tool informer-gen \
--versioned-clientset-package "${OUTPUT_PKG}/${CLIENTSET_PKG_NAME:-clientset}/${CLIENTSET_NAME_VERSIONED:-versioned}" \
--listers-package "${OUTPUT_PKG}/listers" \
--output-pkg "${OUTPUT_PKG}/informers" \
+20
View File
@@ -3,6 +3,7 @@ package collector
import (
"context"
"fmt"
"strings"
"time"
log "github.com/sirupsen/logrus"
@@ -182,6 +183,25 @@ type MetricTypeName struct {
Metric autoscalingv2.MetricIdentifier
}
func (m MetricTypeName) String() string {
str := fmt.Sprintf("%s/%s", m.Type, m.Metric.Name)
if len(m.Metric.Selector.MatchLabels) > 0 {
str += " " + mapToString(m.Metric.Selector.MatchLabels)
}
return str
}
func mapToString(m map[string]string) string {
str := "{"
keyVals := make([]string, 0, len(m))
for k, v := range m {
keyVals = append(keyVals, fmt.Sprintf("%s=%s", k, v))
}
str += strings.Join(keyVals, ",")
str += "}"
return str
}
type CollectedMetric struct {
Type autoscalingv2.MetricSourceType
Namespace string
+1 -1
View File
@@ -1,9 +1,9 @@
package collector
import (
"context"
"time"
"golang.org/x/net/context"
autoscalingv2 "k8s.io/api/autoscaling/v2"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/metrics/pkg/apis/custom_metrics"
+1 -1
View File
@@ -1,13 +1,13 @@
package collector
import (
"context"
"fmt"
"strconv"
"strings"
"time"
"github.com/zalando-incubator/kube-metrics-adapter/pkg/zmon"
"golang.org/x/net/context"
autoscalingv2 "k8s.io/api/autoscaling/v2"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+1 -1
View File
@@ -1,10 +1,10 @@
package scheduledscaling
import (
"context"
"fmt"
"time"
"golang.org/x/net/context"
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
apimeta "k8s.io/apimachinery/pkg/api/meta"
@@ -1,6 +1,7 @@
package scheduledscaling
import (
"context"
"errors"
"fmt"
"math"
@@ -10,7 +11,6 @@ import (
v1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
zalandov1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/typed/zalando.org/v1"
"github.com/zalando-incubator/kube-metrics-adapter/pkg/recorder"
"golang.org/x/net/context"
"golang.org/x/sync/errgroup"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
@@ -57,7 +57,7 @@ var (
type now func() time.Time
type scalingScheduleStore interface {
List() []interface{}
List() []any
}
type Controller struct {
@@ -325,7 +325,7 @@ func highestActiveSchedule(hpa *autoscalingv2.HorizontalPodAutoscaler, activeSch
continue
}
target := int64(metric.Object.Target.AverageValue.MilliValue() / 1000)
target := float64(metric.Object.Target.AverageValue.MilliValue()) / 1000.0
if target == 0 {
continue
}
@@ -338,10 +338,10 @@ func highestActiveSchedule(hpa *autoscalingv2.HorizontalPodAutoscaler, activeSch
value = activeSchedules[scheduleName]
}
expected := int64(math.Ceil(float64(value) / float64(target)))
expected := int64(math.Ceil(float64(value) / target))
if expected > highestExpected {
highestExpected = expected
usageRatio = float64(value) / (float64(target) * float64(currentReplicas))
usageRatio = float64(value) / (target * float64(currentReplicas))
highestObject = metric.Object.DescribedObject
}
}
@@ -336,35 +336,42 @@ func TestAdjustScaling(t *testing.T) {
msg string
currentReplicas int32
desiredReplicas int32
targetValue int64
targetValue string
scheduleTarget int64
}{
{
msg: "current less than 10%% below desired (target 10000)",
currentReplicas: 28, // 7.1% increase to desired
desiredReplicas: 31,
targetValue: 333, // 10000/333 ~= 31
targetValue: "333", // 10000/333 ~= 31
scheduleTarget: 10000,
},
{
msg: "current less than 10%% below desired",
currentReplicas: 95, // 5.3% increase to desired
desiredReplicas: 100,
targetValue: 10, // 1000/10 = 100
targetValue: "10", // 1000/10 = 100
scheduleTarget: 1000,
},
{
msg: "current more than 10%% below desired, no adjustment",
currentReplicas: 90, // 11% increase to desired
desiredReplicas: 90,
targetValue: 10, // 1000/10 = 100
targetValue: "10", // 1000/10 = 100
scheduleTarget: 1000,
},
{
msg: "invalid HPA should not do any adjustment",
currentReplicas: 95,
desiredReplicas: 95,
targetValue: 0, // this is treated as invalid in the test, thus the HPA is ingored and no adjustment happens.
targetValue: "", // this is treated as invalid in the test, thus the HPA is ingored and no adjustment happens.
scheduleTarget: 1000,
},
{
msg: "handle milivalue as targetValue",
currentReplicas: 90, // 5.8% increase to desired
desiredReplicas: 96,
targetValue: "10500m", // 1000/10.5 ~= 96
scheduleTarget: 1000,
},
} {
@@ -444,8 +451,11 @@ func TestAdjustScaling(t *testing.T) {
},
}
if tc.targetValue != 0 {
hpa.Spec.Metrics[0].Object.Target.AverageValue = resource.NewQuantity(tc.targetValue, resource.DecimalSI)
if tc.targetValue != "" {
quantity, err := resource.ParseQuantity(tc.targetValue)
require.NoError(t, err)
hpa.Spec.Metrics[0].Object.Target.AverageValue = &quantity
}
hpa, err = kubeClient.AutoscalingV2().HorizontalPodAutoscalers("default").Create(context.Background(), hpa, metav1.CreateOptions{})
+4 -3
View File
@@ -3,6 +3,7 @@ package provider
import (
"context"
"errors"
"fmt"
"reflect"
"sync"
"time"
@@ -375,18 +376,18 @@ func (t *CollectorScheduler) Add(resourceRef resourceReference, typeName collect
collectors[typeName] = cancel
// start runner for new collector
go collectorRunner(ctx, metricCollector, t.metricSink)
go collectorRunner(ctx, typeName, metricCollector, t.metricSink)
}
// collectorRunner runs a collector at the desirec interval. If the passed
// context is canceled the collection will be stopped.
func collectorRunner(ctx context.Context, collector collector.Collector, metricsc chan<- metricCollection) {
func collectorRunner(ctx context.Context, typeName collector.MetricTypeName, collector collector.Collector, metricsc chan<- metricCollection) {
for {
values, err := collector.GetMetrics(ctx)
metricsc <- metricCollection{
Values: values,
Error: err,
Error: fmt.Errorf("getting metrics for %s failed: %w", typeName, err),
}
select {
+1 -1
View File
@@ -1,13 +1,13 @@
package provider
import (
"context"
"sort"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/zalando-incubator/kube-metrics-adapter/pkg/collector"
"golang.org/x/net/context"
autoscalingv2 "k8s.io/api/autoscaling/v2"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+12
View File
@@ -70,6 +70,8 @@ func NewCommandStartAdapterServer(stopCh <-chan struct{}) *cobra.Command {
NakadiTokenName: "nakadi",
CredentialsDir: "/meta/credentials",
ExternalRPSMetricName: "skipper_serve_host_duration_seconds_count",
KubeClientQPS: 0.0, // 0.0 will use the 5.0 default in client-go
KubeClientBurst: 0, // 0 will use the 10 default in client-go
}
cmd := &cobra.Command{
@@ -153,6 +155,10 @@ func NewCommandStartAdapterServer(stopCh <-chan struct{}) *cobra.Command {
"The name of the metric that should be used to query prometheus for RPS per hostname.")
flags.BoolVar(&o.ExternalRPSMetrics, "external-rps-metrics", o.ExternalRPSMetrics, ""+
"whether to enable external RPS metric collector or not")
flags.Float64Var(&o.KubeClientQPS, "kube-client-qps", o.KubeClientQPS, ""+
"maximum queries per second (QPS) to the Kubernetes API server (increase for large clusters), defaults to 5")
flags.IntVar(&o.KubeClientBurst, "kube-client-burst", o.KubeClientBurst, ""+
"maximum burst for throttle to the Kubernetes API server (increase for large clusters, defaults to 10)")
return cmd
}
@@ -199,6 +205,8 @@ func (o AdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-chan struct
}()
clientConfig.Timeout = defaultClientGOTimeout
clientConfig.QPS = float32(o.KubeClientQPS)
clientConfig.Burst = o.KubeClientBurst
client, err := kubernetes.NewForConfig(clientConfig)
if err != nil {
@@ -546,4 +554,8 @@ type AdapterServerOptions struct {
ExternalRPSMetrics bool
// Name of the Prometheus metric that stores RPS by hostname for external RPS metrics.
ExternalRPSMetricName string
// KubeClientQPS configures the maximum QPS to the Kubernetes API server
KubeClientQPS float64
// KubeClientBurst configures the maximum burst for throttle to the Kubernetes API server
KubeClientBurst int
}