Compare commits

...

37 Commits

Author SHA1 Message Date
Markus Wyrsch 5ed6fec37d feat: add openapi schema and apply configurations
- Add OpenAPI schema generation for zalando.org/v1 API types
- Generate apply configurations for client-side apply operations
- Create models-schema tool for extracting OpenAPI definitions
- Update code generation scripts to support applyconfiguration-gen
- Add +k8s:openapi-gen=true annotations to API packages
- Enhance client interfaces with Apply and ApplyStatus methods
- Update fake clients to support field management
- Modernize test clients with new NewClientset constructors

This enables server-side apply functionality and improves API
discoverability through proper OpenAPI schema definitions for
ScalingSchedule and ClusterScalingSchedule resources.

Signed-off-by: Markus Wyrsch <markus.wyrsch@zalando.de>
2026-03-16 17:23:13 +01:00
Markus Wyrsch fa91142ee3 Use NewClientset
Signed-off-by: Markus Wyrsch <markus.wyrsch@zalando.de>
2026-03-16 12:19:23 +01:00
Markus Wyrsch 1acac49615 Add also generated files
Signed-off-by: Markus Wyrsch <markus.wyrsch@zalando.de>
2026-03-13 16:35:05 +01:00
Markus Wyrsch 529fd3e059 chore(deps): update k8s.io/* to v0.35.2
Signed-off-by: Markus Wyrsch <markus.wyrsch@zalando.de>
2026-03-13 16:14:15 +01:00
Belmin Bedak 55bb290076 retry failed nakadi requests and respect the rate limits (#862)
Signed-off-by: Belmin Bedak <belmin.bedak@zalando.de>
Co-authored-by: Belmin Bedak <belmin.bedak@zalando.de>
2026-02-20 14:20:02 +01:00
Martin Linkhorst 70641827ce Merge pull request #869 from zalando-incubator/fix-nil-pointer
fix: Nil check Metric.Selector in MetricTypeName
2026-02-19 17:55:39 +01:00
Markus Wyrsch 99ca95588e fix: Nil check Metric.Selector in MetricTypeName
Signed-off-by: Markus Wyrsch <markus.wyrsch@zalando.de>
2026-02-19 16:11:46 +01:00
Markus cc9952d66e fix: Only format if there is actual an error (#868)
* fix: Only format if there is actual an error

Signed-off-by: Markus Wyrsch <markus.wyrsch@zalando.de>

* small styling fixes

Signed-off-by: Martin Linkhorst <martin.linkhorst@zalando.de>

---------

Signed-off-by: Markus Wyrsch <markus.wyrsch@zalando.de>
Signed-off-by: Martin Linkhorst <martin.linkhorst@zalando.de>
Co-authored-by: Markus Wyrsch <markus.wyrsch@zalando.de>
Co-authored-by: Martin Linkhorst <martin.linkhorst@zalando.de>
2026-02-18 20:52:18 +01:00
Katyanna Moura 58c6a56cbf Merge pull request #861 from zalando-incubator/dependabot/github_actions/github-actions-5b791d3f7c
Bump the github-actions group with 3 updates
2026-02-18 13:18:26 +01:00
Katyanna Moura 9e3a1760f1 Merge pull request #866 from zalando-incubator/dependabot/go_modules/all-go-mod-patch-and-minor-cd0c2694b7
Bump the all-go-mod-patch-and-minor group with 7 updates
2026-02-18 13:18:14 +01:00
Jens Hausherr 0e52e076c1 Enable adding annotations to apiservice resources (#865)
Signed-off-by: Jens Hausherr <jens.hausherr@pflege.de>
2026-02-16 09:06:54 +01:00
dependabot[bot] 18faf9c076 Bump the all-go-mod-patch-and-minor group with 7 updates
Bumps the all-go-mod-patch-and-minor group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/argoproj/argo-rollouts](https://github.com/argoproj/argo-rollouts) | `1.8.3` | `1.8.4` |
| [k8s.io/api](https://github.com/kubernetes/api) | `0.34.3` | `0.34.4` |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.34.3` | `0.34.4` |
| [k8s.io/apiserver](https://github.com/kubernetes/apiserver) | `0.34.3` | `0.34.4` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.34.3` | `0.34.4` |
| [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.34.3` | `0.34.4` |
| [k8s.io/metrics](https://github.com/kubernetes/metrics) | `0.34.3` | `0.34.4` |


Updates `github.com/argoproj/argo-rollouts` from 1.8.3 to 1.8.4
- [Release notes](https://github.com/argoproj/argo-rollouts/releases)
- [Changelog](https://github.com/argoproj/argo-rollouts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/argoproj/argo-rollouts/compare/v1.8.3...v1.8.4)

Updates `k8s.io/api` from 0.34.3 to 0.34.4
- [Commits](https://github.com/kubernetes/api/compare/v0.34.3...v0.34.4)

Updates `k8s.io/apimachinery` from 0.34.3 to 0.34.4
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.34.3...v0.34.4)

Updates `k8s.io/apiserver` from 0.34.3 to 0.34.4
- [Commits](https://github.com/kubernetes/apiserver/compare/v0.34.3...v0.34.4)

Updates `k8s.io/client-go` from 0.34.3 to 0.34.4
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.34.3...v0.34.4)

Updates `k8s.io/component-base` from 0.34.3 to 0.34.4
- [Commits](https://github.com/kubernetes/component-base/compare/v0.34.3...v0.34.4)

Updates `k8s.io/metrics` from 0.34.3 to 0.34.4
- [Commits](https://github.com/kubernetes/metrics/compare/v0.34.3...v0.34.4)

---
updated-dependencies:
- dependency-name: github.com/argoproj/argo-rollouts
  dependency-version: 1.8.4
  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.4
  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.4
  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.4
  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.4
  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.4
  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.34.4
  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>
2026-02-16 06:32:11 +00:00
dependabot[bot] 170faf8809 Bump golang.org/x/oauth2 in the all-go-mod-patch-and-minor group (#863)
Bumps the all-go-mod-patch-and-minor group with 1 update: [golang.org/x/oauth2](https://github.com/golang/oauth2).


Updates `golang.org/x/oauth2` from 0.34.0 to 0.35.0
- [Commits](https://github.com/golang/oauth2/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-version: 0.35.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-12 16:09:31 +01:00
dependabot[bot] 419f75cf18 Bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-go](https://github.com/actions/setup-go) and [docker/login-action](https://github.com/docker/login-action).


Updates `actions/checkout` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6.0.1...v6.0.2)

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

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

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/setup-go
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: docker/login-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 06:28:13 +00:00
dependabot[bot] 0fe764be7c Bump the all-go-mod-patch-and-minor group across 1 directory with 6 updates (#859)
Bumps the all-go-mod-patch-and-minor group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.41.0` | `1.41.1` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.32.6` | `1.32.7` |
| [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) | `1.42.20` | `1.42.21` |
| [github.com/prometheus/common](https://github.com/prometheus/common) | `0.67.4` | `0.67.5` |
| [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) | `1.9.3` | `1.9.4` |
| [k8s.io/metrics](https://github.com/kubernetes/metrics) | `0.34.2` | `0.34.3` |



Updates `github.com/aws/aws-sdk-go-v2` from 1.41.0 to 1.41.1
- [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.41.0...v1.41.1)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.32.6 to 1.32.7
- [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.32.6...v1.32.7)

Updates `github.com/aws/aws-sdk-go-v2/service/sqs` from 1.42.20 to 1.42.21
- [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.20...service/sqs/v1.42.21)

Updates `github.com/prometheus/common` from 0.67.4 to 0.67.5
- [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.4...v0.67.5)

Updates `github.com/sirupsen/logrus` from 1.9.3 to 1.9.4
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.3...v1.9.4)

Updates `k8s.io/metrics` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/metrics/compare/v0.34.2...v0.34.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.41.1
  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.32.7
  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.21
  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.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/sirupsen/logrus
  dependency-version: 1.9.4
  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.34.3
  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>
2026-01-20 14:35:22 +01:00
Katyanna Moura 6a245b7e1e Merge pull request #854 from zalando-incubator/dependabot/go_modules/all-go-mod-patch-and-minor-dfce17d494
Bump the all-go-mod-patch-and-minor group across 1 directory with 13 updates
2026-01-02 10:23:08 +01:00
Katyanna Moura 7a4d08cd77 Merge pull request #856 from zalando-incubator/dependabot/github_actions/github-actions-20d51ea382
Bump the github-actions group with 2 updates
2026-01-02 10:20:52 +01:00
Katyanna Moura 1a9eaeedcb Merge pull request #855 from zalando-incubator/enrich-error-with-metric
Enrich GetMetrics errors with metric identifier
2026-01-02 10:19:17 +01:00
Mikkel Oscar Lyderik Larsen 0227a3fa07 Update generated code
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2026-01-02 10:13:53 +01:00
dependabot[bot] 430b2382f6 Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action).


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

Updates `docker/setup-buildx-action` from 3.11.1 to 3.12.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/e468171a9de216ec08956ac3ada2f0791b6bd435...8d2750c68a42422c14e847fe6c8ac0403b4cbd6f)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/setup-buildx-action
  dependency-version: 3.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 06:18:28 +00:00
dependabot[bot] f64cfab5c9 Bump the all-go-mod-patch-and-minor group across 1 directory with 13 updates
Bumps the all-go-mod-patch-and-minor group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.40.0` | `1.41.0` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.32.2` | `1.32.5` |
| [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) | `1.42.17` | `1.42.20` |
| [github.com/spf13/cobra](https://github.com/spf13/cobra) | `1.10.1` | `1.10.2` |
| [golang.org/x/oauth2](https://github.com/golang/oauth2) | `0.33.0` | `0.34.0` |
| [golang.org/x/sync](https://github.com/golang/sync) | `0.18.0` | `0.19.0` |
| [k8s.io/api](https://github.com/kubernetes/api) | `0.34.2` | `0.34.3` |
| [k8s.io/apiserver](https://github.com/kubernetes/apiserver) | `0.34.2` | `0.34.3` |
| [k8s.io/metrics](https://github.com/kubernetes/metrics) | `0.33.6` | `0.33.7` |
| [sigs.k8s.io/custom-metrics-apiserver](https://github.com/kubernetes-sigs/custom-metrics-apiserver) | `1.33.0` | `1.34.0` |



Updates `github.com/aws/aws-sdk-go-v2` from 1.40.0 to 1.41.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.40.0...v1.41.0)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.32.2 to 1.32.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/v1.32.2...v1.32.5)

Updates `github.com/aws/aws-sdk-go-v2/service/sqs` from 1.42.17 to 1.42.20
- [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.17...service/sqs/v1.42.20)

Updates `github.com/spf13/cobra` from 1.10.1 to 1.10.2
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.10.1...v1.10.2)

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

Updates `golang.org/x/sync` from 0.18.0 to 0.19.0
- [Commits](https://github.com/golang/sync/compare/v0.18.0...v0.19.0)

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

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

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

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

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

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

Updates `sigs.k8s.io/custom-metrics-apiserver` from 1.33.0 to 1.34.0
- [Release notes](https://github.com/kubernetes-sigs/custom-metrics-apiserver/releases)
- [Changelog](https://github.com/kubernetes-sigs/custom-metrics-apiserver/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/custom-metrics-apiserver/compare/v1.33.0...v1.34.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.41.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.5
  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.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: github.com/spf13/cobra
  dependency-version: 1.10.2
  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.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: golang.org/x/sync
  dependency-version: 0.19.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.3
  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.3
  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.3
  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.3
  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.3
  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.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-mod-patch-and-minor
- dependency-name: sigs.k8s.io/custom-metrics-apiserver
  dependency-version: 1.34.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-12-22 06:05:23 +00:00
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
Katyanna Moura bfd050e5b6 Merge pull request #831 from zalando-incubator/update-helm-v0.2.6
Update helm chart to latest version v0.2.6
2025-09-12 14:56:41 +02:00
47 changed files with 3389 additions and 1696 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.0.2
- uses: actions/setup-go@v6.2.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.0.2
- name: setup go
uses: actions/setup-go@v6.0.0
uses: actions/setup-go@v6.2.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
+7 -7
View File
@@ -25,15 +25,15 @@ jobs:
packages: write # to push packages
steps:
- name: Checkout
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
- uses: actions/setup-go@a5f9b05d2d216f63e13859e0d847461041025775
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@c94ce9fb468520275223c153574b00df6fe4bcc9
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
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
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.0.2
with:
fetch-depth: 0
+3 -2
View File
@@ -34,18 +34,19 @@ $(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 \
--output-pkg github.com/zalando-incubator/kube-metrics-adapter/pkg/api/generated/openapi \
--output-file zz_generated.openapi.go \
-r /dev/null \
github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1 \
k8s.io/metrics/pkg/apis/custom_metrics \
k8s.io/metrics/pkg/apis/custom_metrics/v1beta1 \
k8s.io/metrics/pkg/apis/custom_metrics/v1beta2 \
@@ -3,6 +3,13 @@ apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.custom.metrics.k8s.io
{{- with .Values.customMetricsApi.annotations }}
annotations:
{{- range $k, $v := . }}
{{- $value := $v | quote }}
{{- printf "%s: %s" (tpl $k $) (tpl $value $) | nindent 4 }}
{{- end }}
{{- end }}
spec:
service:
name: kube-metrics-adapter
@@ -13,3 +20,4 @@ spec:
groupPriorityMinimum: 100
versionPriority: 100
{{- end}}
""
@@ -3,6 +3,13 @@ apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.external.metrics.k8s.io
{{- with .Values.externalMetricsApi.annotations }}
annotations:
{{- range $k, $v := . }}
{{- $value := $v | quote }}
{{- printf "%s: %s" (tpl $k $) (tpl $value $) | nindent 4 }}
{{- end }}
{{- end }}
spec:
service:
name: kube-metrics-adapter
+12
View File
@@ -15,7 +15,19 @@ addDirectoryHeader:
contentionProfiling:
profiling:
enableCustomMetricsApi: true
# -- add annotations to the custom metrics apiservice resource, e.g.
# cert-manager.io/inject-ca-from: {{.Release.Namespace}}/kube-metrics-adapter to inject the CA certificate form a cert-manager-issued cert used for the deployment
customMetricsApi:
annotations: {}
enableExternalMetricsApi: true
# -- add annotations to the custom metrics apiservice resource, e.g.
# cert-manager.io/inject-ca-from: {{.Release.Namespace}}/kube-metrics-adapter to inject the CA certificate form a cert-manager-issued cert used for the deployment
externalMetricsApi:
annotations: {}
credentialsDirectory:
disregardIncompatibleHPAs:
http2MaxStreamsPerConnection:
+128 -109
View File
File diff suppressed because it is too large Load Diff
+256 -478
View File
File diff suppressed because it is too large Load Diff
+23 -5
View File
@@ -31,30 +31,48 @@ 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}"
APPLYCONFIG_PKG="${OUTPUT_PKG}/applyconfiguration"
echo "Generating apply configurations for ${GROUPS_WITH_VERSIONS} at ${APPLYCONFIG_PKG}"
# Generate the OpenAPI schema JSON to use for applyconfiguration-gen
OPENAPI_SCHEMA_FILE=$(mktemp -t "openapi-schema-XXXXXX.json")
trap 'rm -f ${OPENAPI_SCHEMA_FILE}' EXIT
echo "Extracting OpenAPI schema to ${OPENAPI_SCHEMA_FILE}"
go tool models-schema >"${OPENAPI_SCHEMA_FILE}"
go tool applyconfiguration-gen \
--output-pkg "${APPLYCONFIG_PKG}" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
--output-dir "${OUTPUT_DIR}/applyconfiguration" \
--openapi-schema "${OPENAPI_SCHEMA_FILE}" \
"${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}" \
--output-pkg "${OUTPUT_PKG}/clientset" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
--output-dir "${OUTPUT_DIR}/clientset"
--output-dir "${OUTPUT_DIR}/clientset" \
--apply-configuration-package "${APPLYCONFIG_PKG}"
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" \
@@ -0,0 +1,76 @@
/*
Copyright 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.
*/
package main
import (
"encoding/json"
"fmt"
"os"
"github.com/zalando-incubator/kube-metrics-adapter/pkg/api/generated/openapi"
"k8s.io/kube-openapi/pkg/common"
"k8s.io/kube-openapi/pkg/validation/spec"
)
// Outputs openAPI schema JSON containing the schema definitions in zz_generated.openapi.go.
func main() {
err := output()
if err != nil {
os.Stderr.WriteString(fmt.Sprintf("Failed: %v", err))
os.Exit(1)
}
}
func output() error {
refFunc := func(name string) spec.Ref {
return spec.MustCreateRef(fmt.Sprintf("#/definitions/%s", name))
}
defs := openapi.GetOpenAPIDefinitions(refFunc)
schemaDefs := make(map[string]spec.Schema, len(defs))
for k, v := range defs {
// Replace top-level schema with v2 if a v2 schema is embedded
// so that the output of this program is always in OpenAPI v2.
// This is done by looking up an extension that marks the embedded v2
// schema, and, if the v2 schema is found, make it the resulting schema for
// the type.
if schema, ok := v.Schema.Extensions[common.ExtensionV2Schema]; ok {
if v2Schema, isOpenAPISchema := schema.(spec.Schema); isOpenAPISchema {
schemaDefs[k] = v2Schema
continue
}
}
schemaDefs[k] = v.Schema
}
data, err := json.Marshal(&spec.Swagger{
SwaggerProps: spec.SwaggerProps{
Definitions: schemaDefs,
Info: &spec.Info{
InfoProps: spec.InfoProps{
Title: "Kube Metrics Adapter",
Version: "unversioned",
},
},
Swagger: "2.0",
},
})
if err != nil {
return fmt.Errorf("error serializing api definitions: %w", err)
}
os.Stdout.Write(data)
return nil
}
File diff suppressed because it is too large Load Diff
@@ -1,11 +1,12 @@
// +build tools
/*
Copyright 2019 The Kubernetes Authors.
Copyright 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.
@@ -13,11 +14,6 @@ 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
// +k8s:openapi-gen=true
import (
_ "k8s.io/code-generator"
_ "k8s.io/kube-openapi/cmd/openapi-gen"
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
)
package v1
+1
View File
@@ -1,5 +1,6 @@
// Package v1 contains API Schema definitions for the zalando v1 API group
// +kubebuilder:object:generate=true
// +k8s:openapi-gen=true
// +groupName=zalando.org
package v1
+2
View File
@@ -1,5 +1,7 @@
package v1
// +k8s:openapi-gen=true
import (
"time"
@@ -0,0 +1,82 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package internal
import (
fmt "fmt"
sync "sync"
typed "sigs.k8s.io/structured-merge-diff/v6/typed"
)
func Parser() *typed.Parser {
parserOnce.Do(func() {
var err error
parser, err = typed.NewParser(schemaYAML)
if err != nil {
panic(fmt.Sprintf("Failed to parse schema: %v", err))
}
})
return parser
}
var parserOnce sync.Once
var parser *typed.Parser
var schemaYAML = typed.YAMLObject(`types:
- name: com.github.zalando-incubator.kube-metrics-adapter.pkg.apis.zalando.org.v1.ClusterScalingSchedule
scalar: untyped
list:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
map:
elementType:
namedType: __untyped_deduced_
elementRelationship: separable
- name: com.github.zalando-incubator.kube-metrics-adapter.pkg.apis.zalando.org.v1.ScalingSchedule
scalar: untyped
list:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
map:
elementType:
namedType: __untyped_deduced_
elementRelationship: separable
- name: __untyped_atomic_
scalar: untyped
list:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
map:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
- name: __untyped_deduced_
scalar: untyped
list:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
map:
elementType:
namedType: __untyped_deduced_
elementRelationship: separable
`)
+54
View File
@@ -0,0 +1,54 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package applyconfiguration
import (
v1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
internal "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/internal"
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/zalando.org/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
)
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
// apply configuration type exists for the given GroupVersionKind.
func ForKind(kind schema.GroupVersionKind) interface{} {
switch kind {
// Group=zalando.org, Version=v1
case v1.SchemeGroupVersion.WithKind("ClusterScalingSchedule"):
return &zalandoorgv1.ClusterScalingScheduleApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("ScalingSchedule"):
return &zalandoorgv1.ScalingScheduleApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("ScalingScheduleSpec"):
return &zalandoorgv1.ScalingScheduleSpecApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("ScalingScheduleStatus"):
return &zalandoorgv1.ScalingScheduleStatusApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("Schedule"):
return &zalandoorgv1.ScheduleApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("SchedulePeriod"):
return &zalandoorgv1.SchedulePeriodApplyConfiguration{}
}
return nil
}
func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter {
return managedfields.NewSchemeTypeConverter(scheme, internal.Parser())
}
@@ -0,0 +1,288 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
internal "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/internal"
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ClusterScalingScheduleApplyConfiguration represents a declarative configuration of the ClusterScalingSchedule type for use
// with apply.
//
// ClusterScalingSchedule describes a cluster scoped time based metric
// to be used in autoscaling operations.
type ClusterScalingScheduleApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ScalingScheduleSpecApplyConfiguration `json:"spec,omitempty"`
Status *ScalingScheduleStatusApplyConfiguration `json:"status,omitempty"`
}
// ClusterScalingSchedule constructs a declarative configuration of the ClusterScalingSchedule type for use with
// apply.
func ClusterScalingSchedule(name string) *ClusterScalingScheduleApplyConfiguration {
b := &ClusterScalingScheduleApplyConfiguration{}
b.WithName(name)
b.WithKind("ClusterScalingSchedule")
b.WithAPIVersion("zalando.org/v1")
return b
}
// ExtractClusterScalingScheduleFrom extracts the applied configuration owned by fieldManager from
// clusterScalingSchedule for the specified subresource. Pass an empty string for subresource to extract
// the main resource. Common subresources include "status", "scale", etc.
// clusterScalingSchedule must be a unmodified ClusterScalingSchedule API object that was retrieved from the Kubernetes API.
// ExtractClusterScalingScheduleFrom provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractClusterScalingScheduleFrom(clusterScalingSchedule *zalandoorgv1.ClusterScalingSchedule, fieldManager string, subresource string) (*ClusterScalingScheduleApplyConfiguration, error) {
b := &ClusterScalingScheduleApplyConfiguration{}
err := managedfields.ExtractInto(clusterScalingSchedule, internal.Parser().Type("com.github.zalando-incubator.kube-metrics-adapter.pkg.apis.zalando.org.v1.ClusterScalingSchedule"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(clusterScalingSchedule.Name)
b.WithKind("ClusterScalingSchedule")
b.WithAPIVersion("zalando.org/v1")
return b, nil
}
// ExtractClusterScalingSchedule extracts the applied configuration owned by fieldManager from
// clusterScalingSchedule. If no managedFields are found in clusterScalingSchedule for fieldManager, a
// ClusterScalingScheduleApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// clusterScalingSchedule must be a unmodified ClusterScalingSchedule API object that was retrieved from the Kubernetes API.
// ExtractClusterScalingSchedule provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractClusterScalingSchedule(clusterScalingSchedule *zalandoorgv1.ClusterScalingSchedule, fieldManager string) (*ClusterScalingScheduleApplyConfiguration, error) {
return ExtractClusterScalingScheduleFrom(clusterScalingSchedule, fieldManager, "")
}
// ExtractClusterScalingScheduleStatus extracts the applied configuration owned by fieldManager from
// clusterScalingSchedule for the status subresource.
func ExtractClusterScalingScheduleStatus(clusterScalingSchedule *zalandoorgv1.ClusterScalingSchedule, fieldManager string) (*ClusterScalingScheduleApplyConfiguration, error) {
return ExtractClusterScalingScheduleFrom(clusterScalingSchedule, fieldManager, "status")
}
func (b ClusterScalingScheduleApplyConfiguration) IsApplyConfiguration() {}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithKind(value string) *ClusterScalingScheduleApplyConfiguration {
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithAPIVersion(value string) *ClusterScalingScheduleApplyConfiguration {
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithName(value string) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithGenerateName(value string) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithNamespace(value string) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithUID(value types.UID) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithResourceVersion(value string) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithGeneration(value int64) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ClusterScalingScheduleApplyConfiguration) WithLabels(entries map[string]string) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ClusterScalingScheduleApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *ClusterScalingScheduleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *ClusterScalingScheduleApplyConfiguration) WithFinalizers(values ...string) *ClusterScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *ClusterScalingScheduleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithSpec(value *ScalingScheduleSpecApplyConfiguration) *ClusterScalingScheduleApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
func (b *ClusterScalingScheduleApplyConfiguration) WithStatus(value *ScalingScheduleStatusApplyConfiguration) *ClusterScalingScheduleApplyConfiguration {
b.Status = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *ClusterScalingScheduleApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *ClusterScalingScheduleApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ClusterScalingScheduleApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *ClusterScalingScheduleApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}
@@ -0,0 +1,290 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
internal "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/internal"
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ScalingScheduleApplyConfiguration represents a declarative configuration of the ScalingSchedule type for use
// with apply.
//
// ScalingSchedule describes a namespaced time based metric to be used
// in autoscaling operations.
type ScalingScheduleApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ScalingScheduleSpecApplyConfiguration `json:"spec,omitempty"`
Status *ScalingScheduleStatusApplyConfiguration `json:"status,omitempty"`
}
// ScalingSchedule constructs a declarative configuration of the ScalingSchedule type for use with
// apply.
func ScalingSchedule(name, namespace string) *ScalingScheduleApplyConfiguration {
b := &ScalingScheduleApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ScalingSchedule")
b.WithAPIVersion("zalando.org/v1")
return b
}
// ExtractScalingScheduleFrom extracts the applied configuration owned by fieldManager from
// scalingSchedule for the specified subresource. Pass an empty string for subresource to extract
// the main resource. Common subresources include "status", "scale", etc.
// scalingSchedule must be a unmodified ScalingSchedule API object that was retrieved from the Kubernetes API.
// ExtractScalingScheduleFrom provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractScalingScheduleFrom(scalingSchedule *zalandoorgv1.ScalingSchedule, fieldManager string, subresource string) (*ScalingScheduleApplyConfiguration, error) {
b := &ScalingScheduleApplyConfiguration{}
err := managedfields.ExtractInto(scalingSchedule, internal.Parser().Type("com.github.zalando-incubator.kube-metrics-adapter.pkg.apis.zalando.org.v1.ScalingSchedule"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(scalingSchedule.Name)
b.WithNamespace(scalingSchedule.Namespace)
b.WithKind("ScalingSchedule")
b.WithAPIVersion("zalando.org/v1")
return b, nil
}
// ExtractScalingSchedule extracts the applied configuration owned by fieldManager from
// scalingSchedule. If no managedFields are found in scalingSchedule for fieldManager, a
// ScalingScheduleApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// scalingSchedule must be a unmodified ScalingSchedule API object that was retrieved from the Kubernetes API.
// ExtractScalingSchedule provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractScalingSchedule(scalingSchedule *zalandoorgv1.ScalingSchedule, fieldManager string) (*ScalingScheduleApplyConfiguration, error) {
return ExtractScalingScheduleFrom(scalingSchedule, fieldManager, "")
}
// ExtractScalingScheduleStatus extracts the applied configuration owned by fieldManager from
// scalingSchedule for the status subresource.
func ExtractScalingScheduleStatus(scalingSchedule *zalandoorgv1.ScalingSchedule, fieldManager string) (*ScalingScheduleApplyConfiguration, error) {
return ExtractScalingScheduleFrom(scalingSchedule, fieldManager, "status")
}
func (b ScalingScheduleApplyConfiguration) IsApplyConfiguration() {}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithKind(value string) *ScalingScheduleApplyConfiguration {
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithAPIVersion(value string) *ScalingScheduleApplyConfiguration {
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithName(value string) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithGenerateName(value string) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithNamespace(value string) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithUID(value types.UID) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithResourceVersion(value string) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithGeneration(value int64) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ScalingScheduleApplyConfiguration) WithLabels(entries map[string]string) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ScalingScheduleApplyConfiguration) WithAnnotations(entries map[string]string) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *ScalingScheduleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *ScalingScheduleApplyConfiguration) WithFinalizers(values ...string) *ScalingScheduleApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *ScalingScheduleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithSpec(value *ScalingScheduleSpecApplyConfiguration) *ScalingScheduleApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
func (b *ScalingScheduleApplyConfiguration) WithStatus(value *ScalingScheduleStatusApplyConfiguration) *ScalingScheduleApplyConfiguration {
b.Status = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *ScalingScheduleApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *ScalingScheduleApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ScalingScheduleApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *ScalingScheduleApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}
@@ -0,0 +1,60 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// ScalingScheduleSpecApplyConfiguration represents a declarative configuration of the ScalingScheduleSpec type for use
// with apply.
//
// ScalingScheduleSpec is the spec part of the ScalingSchedule.
type ScalingScheduleSpecApplyConfiguration struct {
// Fade the scheduled values in and out over this many minutes. If unset, the default per-cluster value will be used.
ScalingWindowDurationMinutes *int64 `json:"scalingWindowDurationMinutes,omitempty"`
// Schedules is the list of schedules for this ScalingSchedule
// resource. All the schedules defined here will result on the value
// to the same metric. New metrics require a new ScalingSchedule
// resource.
Schedules []ScheduleApplyConfiguration `json:"schedules,omitempty"`
}
// ScalingScheduleSpecApplyConfiguration constructs a declarative configuration of the ScalingScheduleSpec type for use with
// apply.
func ScalingScheduleSpec() *ScalingScheduleSpecApplyConfiguration {
return &ScalingScheduleSpecApplyConfiguration{}
}
// WithScalingWindowDurationMinutes sets the ScalingWindowDurationMinutes field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ScalingWindowDurationMinutes field is set to the value of the last call.
func (b *ScalingScheduleSpecApplyConfiguration) WithScalingWindowDurationMinutes(value int64) *ScalingScheduleSpecApplyConfiguration {
b.ScalingWindowDurationMinutes = &value
return b
}
// WithSchedules adds the given value to the Schedules field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Schedules field.
func (b *ScalingScheduleSpecApplyConfiguration) WithSchedules(values ...*ScheduleApplyConfiguration) *ScalingScheduleSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithSchedules")
}
b.Schedules = append(b.Schedules, *values[i])
}
return b
}
@@ -0,0 +1,43 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// ScalingScheduleStatusApplyConfiguration represents a declarative configuration of the ScalingScheduleStatus type for use
// with apply.
//
// ScalingScheduleStatus is the status section of the ScalingSchedule.
type ScalingScheduleStatusApplyConfiguration struct {
// Active is true if at least one of the schedules defined in the
// scaling schedule is currently active.
Active *bool `json:"active,omitempty"`
}
// ScalingScheduleStatusApplyConfiguration constructs a declarative configuration of the ScalingScheduleStatus type for use with
// apply.
func ScalingScheduleStatus() *ScalingScheduleStatusApplyConfiguration {
return &ScalingScheduleStatusApplyConfiguration{}
}
// WithActive sets the Active field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Active field is set to the value of the last call.
func (b *ScalingScheduleStatusApplyConfiguration) WithActive(value bool) *ScalingScheduleStatusApplyConfiguration {
b.Active = &value
return b
}
@@ -0,0 +1,98 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
)
// ScheduleApplyConfiguration represents a declarative configuration of the Schedule type for use
// with apply.
//
// Schedule is the schedule details to be used inside a ScalingSchedule.
type ScheduleApplyConfiguration struct {
Type *zalandoorgv1.ScheduleType `json:"type,omitempty"`
// Defines the details of a Repeating schedule.
Period *SchedulePeriodApplyConfiguration `json:"period,omitempty"`
// Defines the starting date of a OneTime schedule. It has to
// be a RFC3339 formatted date.
Date *zalandoorgv1.ScheduleDate `json:"date,omitempty"`
// Defines the ending date of a OneTime schedule. It must be
// a RFC3339 formatted date.
EndDate *zalandoorgv1.ScheduleDate `json:"endDate,omitempty"`
// The duration in minutes (default 0) that the configured value will be
// returned for the defined schedule.
DurationMinutes *int `json:"durationMinutes,omitempty"`
// The metric value that will be returned for the defined schedule.
Value *int64 `json:"value,omitempty"`
}
// ScheduleApplyConfiguration constructs a declarative configuration of the Schedule type for use with
// apply.
func Schedule() *ScheduleApplyConfiguration {
return &ScheduleApplyConfiguration{}
}
// WithType sets the Type field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Type field is set to the value of the last call.
func (b *ScheduleApplyConfiguration) WithType(value zalandoorgv1.ScheduleType) *ScheduleApplyConfiguration {
b.Type = &value
return b
}
// WithPeriod sets the Period field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Period field is set to the value of the last call.
func (b *ScheduleApplyConfiguration) WithPeriod(value *SchedulePeriodApplyConfiguration) *ScheduleApplyConfiguration {
b.Period = value
return b
}
// WithDate sets the Date field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Date field is set to the value of the last call.
func (b *ScheduleApplyConfiguration) WithDate(value zalandoorgv1.ScheduleDate) *ScheduleApplyConfiguration {
b.Date = &value
return b
}
// WithEndDate sets the EndDate field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the EndDate field is set to the value of the last call.
func (b *ScheduleApplyConfiguration) WithEndDate(value zalandoorgv1.ScheduleDate) *ScheduleApplyConfiguration {
b.EndDate = &value
return b
}
// WithDurationMinutes sets the DurationMinutes field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DurationMinutes field is set to the value of the last call.
func (b *ScheduleApplyConfiguration) WithDurationMinutes(value int) *ScheduleApplyConfiguration {
b.DurationMinutes = &value
return b
}
// WithValue sets the Value field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Value field is set to the value of the last call.
func (b *ScheduleApplyConfiguration) WithValue(value int64) *ScheduleApplyConfiguration {
b.Value = &value
return b
}
@@ -0,0 +1,80 @@
/*
Copyright 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.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
)
// SchedulePeriodApplyConfiguration represents a declarative configuration of the SchedulePeriod type for use
// with apply.
//
// SchedulePeriod is the details to be used for a Schedule of the
// Repeating type.
type SchedulePeriodApplyConfiguration struct {
// The startTime has the format HH:MM
StartTime *string `json:"startTime,omitempty"`
// The endTime has the format HH:MM
EndTime *string `json:"endTime,omitempty"`
// The days that this schedule will be active.
Days []zalandoorgv1.ScheduleDay `json:"days,omitempty"`
// The location name corresponding to a file in the IANA
// Time Zone database, like Europe/Berlin.
Timezone *string `json:"timezone,omitempty"`
}
// SchedulePeriodApplyConfiguration constructs a declarative configuration of the SchedulePeriod type for use with
// apply.
func SchedulePeriod() *SchedulePeriodApplyConfiguration {
return &SchedulePeriodApplyConfiguration{}
}
// WithStartTime sets the StartTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the StartTime field is set to the value of the last call.
func (b *SchedulePeriodApplyConfiguration) WithStartTime(value string) *SchedulePeriodApplyConfiguration {
b.StartTime = &value
return b
}
// WithEndTime sets the EndTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the EndTime field is set to the value of the last call.
func (b *SchedulePeriodApplyConfiguration) WithEndTime(value string) *SchedulePeriodApplyConfiguration {
b.EndTime = &value
return b
}
// WithDays adds the given value to the Days field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Days field.
func (b *SchedulePeriodApplyConfiguration) WithDays(values ...zalandoorgv1.ScheduleDay) *SchedulePeriodApplyConfiguration {
for i := range values {
b.Days = append(b.Days, values[i])
}
return b
}
// WithTimezone sets the Timezone field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Timezone field is set to the value of the last call.
func (b *SchedulePeriodApplyConfiguration) WithTimezone(value string) *SchedulePeriodApplyConfiguration {
b.Timezone = &value
return b
}
@@ -19,6 +19,7 @@ limitations under the License.
package fake
import (
applyconfiguration "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration"
clientset "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned"
zalandov1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/typed/zalando.org/v1"
fakezalandov1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/typed/zalando.org/v1/fake"
@@ -35,7 +36,7 @@ import (
// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
//
// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves
// Deprecated: NewClientset replaces this with support for field management, which significantly improves
// server side apply testing. NewClientset is only available when apply configurations are generated (e.g.
// via --with-applyconfig).
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
@@ -51,8 +52,8 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
cs.AddReactor("*", "*", testing.ObjectReaction(o))
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
var opts metav1.ListOptions
if watchActcion, ok := action.(testing.WatchActionImpl); ok {
opts = watchActcion.ListOptions
if watchAction, ok := action.(testing.WatchActionImpl); ok {
opts = watchAction.ListOptions
}
gvr := action.GetResource()
ns := action.GetNamespace()
@@ -83,6 +84,53 @@ func (c *Clientset) Tracker() testing.ObjectTracker {
return c.tracker
}
// IsWatchListSemanticsSupported informs the reflector that this client
// doesn't support WatchList semantics.
//
// This is a synthetic method whose sole purpose is to satisfy the optional
// interface check performed by the reflector.
// Returning true signals that WatchList can NOT be used.
// No additional logic is implemented here.
func (c *Clientset) IsWatchListSemanticsUnSupported() bool {
return true
}
// NewClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
func NewClientset(objects ...runtime.Object) *Clientset {
o := testing.NewFieldManagedObjectTracker(
scheme,
codecs.UniversalDecoder(),
applyconfiguration.NewTypeConverter(scheme),
)
for _, obj := range objects {
if err := o.Add(obj); err != nil {
panic(err)
}
}
cs := &Clientset{tracker: o}
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
cs.AddReactor("*", "*", testing.ObjectReaction(o))
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
var opts metav1.ListOptions
if watchAction, ok := action.(testing.WatchActionImpl); ok {
opts = watchAction.ListOptions
}
gvr := action.GetResource()
ns := action.GetNamespace()
watch, err := o.Watch(gvr, ns, opts)
if err != nil {
return false, nil, err
}
return true, watch, nil
})
return cs
}
var (
_ clientset.Interface = &Clientset{}
_ testing.FakeClient = &Clientset{}
@@ -22,6 +22,7 @@ import (
context "context"
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
applyconfigurationzalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/zalando.org/v1"
scheme "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
@@ -47,18 +48,21 @@ type ClusterScalingScheduleInterface interface {
List(ctx context.Context, opts metav1.ListOptions) (*zalandoorgv1.ClusterScalingScheduleList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *zalandoorgv1.ClusterScalingSchedule, err error)
Apply(ctx context.Context, clusterScalingSchedule *applyconfigurationzalandoorgv1.ClusterScalingScheduleApplyConfiguration, opts metav1.ApplyOptions) (result *zalandoorgv1.ClusterScalingSchedule, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, clusterScalingSchedule *applyconfigurationzalandoorgv1.ClusterScalingScheduleApplyConfiguration, opts metav1.ApplyOptions) (result *zalandoorgv1.ClusterScalingSchedule, err error)
ClusterScalingScheduleExpansion
}
// clusterScalingSchedules implements ClusterScalingScheduleInterface
type clusterScalingSchedules struct {
*gentype.ClientWithList[*zalandoorgv1.ClusterScalingSchedule, *zalandoorgv1.ClusterScalingScheduleList]
*gentype.ClientWithListAndApply[*zalandoorgv1.ClusterScalingSchedule, *zalandoorgv1.ClusterScalingScheduleList, *applyconfigurationzalandoorgv1.ClusterScalingScheduleApplyConfiguration]
}
// newClusterScalingSchedules returns a ClusterScalingSchedules
func newClusterScalingSchedules(c *ZalandoV1Client) *clusterScalingSchedules {
return &clusterScalingSchedules{
gentype.NewClientWithList[*zalandoorgv1.ClusterScalingSchedule, *zalandoorgv1.ClusterScalingScheduleList](
gentype.NewClientWithListAndApply[*zalandoorgv1.ClusterScalingSchedule, *zalandoorgv1.ClusterScalingScheduleList, *applyconfigurationzalandoorgv1.ClusterScalingScheduleApplyConfiguration](
"clusterscalingschedules",
c.RESTClient(),
scheme.ParameterCodec,
@@ -20,19 +20,20 @@ package fake
import (
v1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/typed/zalando.org/v1"
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/zalando.org/v1"
typedzalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/typed/zalando.org/v1"
gentype "k8s.io/client-go/gentype"
)
// fakeClusterScalingSchedules implements ClusterScalingScheduleInterface
type fakeClusterScalingSchedules struct {
*gentype.FakeClientWithList[*v1.ClusterScalingSchedule, *v1.ClusterScalingScheduleList]
*gentype.FakeClientWithListAndApply[*v1.ClusterScalingSchedule, *v1.ClusterScalingScheduleList, *zalandoorgv1.ClusterScalingScheduleApplyConfiguration]
Fake *FakeZalandoV1
}
func newFakeClusterScalingSchedules(fake *FakeZalandoV1) zalandoorgv1.ClusterScalingScheduleInterface {
func newFakeClusterScalingSchedules(fake *FakeZalandoV1) typedzalandoorgv1.ClusterScalingScheduleInterface {
return &fakeClusterScalingSchedules{
gentype.NewFakeClientWithList[*v1.ClusterScalingSchedule, *v1.ClusterScalingScheduleList](
gentype.NewFakeClientWithListAndApply[*v1.ClusterScalingSchedule, *v1.ClusterScalingScheduleList, *zalandoorgv1.ClusterScalingScheduleApplyConfiguration](
fake.Fake,
"",
v1.SchemeGroupVersion.WithResource("clusterscalingschedules"),
@@ -20,19 +20,20 @@ package fake
import (
v1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/typed/zalando.org/v1"
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/zalando.org/v1"
typedzalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/typed/zalando.org/v1"
gentype "k8s.io/client-go/gentype"
)
// fakeScalingSchedules implements ScalingScheduleInterface
type fakeScalingSchedules struct {
*gentype.FakeClientWithList[*v1.ScalingSchedule, *v1.ScalingScheduleList]
*gentype.FakeClientWithListAndApply[*v1.ScalingSchedule, *v1.ScalingScheduleList, *zalandoorgv1.ScalingScheduleApplyConfiguration]
Fake *FakeZalandoV1
}
func newFakeScalingSchedules(fake *FakeZalandoV1, namespace string) zalandoorgv1.ScalingScheduleInterface {
func newFakeScalingSchedules(fake *FakeZalandoV1, namespace string) typedzalandoorgv1.ScalingScheduleInterface {
return &fakeScalingSchedules{
gentype.NewFakeClientWithList[*v1.ScalingSchedule, *v1.ScalingScheduleList](
gentype.NewFakeClientWithListAndApply[*v1.ScalingSchedule, *v1.ScalingScheduleList, *zalandoorgv1.ScalingScheduleApplyConfiguration](
fake.Fake,
namespace,
v1.SchemeGroupVersion.WithResource("scalingschedules"),
@@ -22,6 +22,7 @@ import (
context "context"
zalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/apis/zalando.org/v1"
applyconfigurationzalandoorgv1 "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/applyconfiguration/zalando.org/v1"
scheme "github.com/zalando-incubator/kube-metrics-adapter/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
@@ -47,18 +48,21 @@ type ScalingScheduleInterface interface {
List(ctx context.Context, opts metav1.ListOptions) (*zalandoorgv1.ScalingScheduleList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *zalandoorgv1.ScalingSchedule, err error)
Apply(ctx context.Context, scalingSchedule *applyconfigurationzalandoorgv1.ScalingScheduleApplyConfiguration, opts metav1.ApplyOptions) (result *zalandoorgv1.ScalingSchedule, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, scalingSchedule *applyconfigurationzalandoorgv1.ScalingScheduleApplyConfiguration, opts metav1.ApplyOptions) (result *zalandoorgv1.ScalingSchedule, err error)
ScalingScheduleExpansion
}
// scalingSchedules implements ScalingScheduleInterface
type scalingSchedules struct {
*gentype.ClientWithList[*zalandoorgv1.ScalingSchedule, *zalandoorgv1.ScalingScheduleList]
*gentype.ClientWithListAndApply[*zalandoorgv1.ScalingSchedule, *zalandoorgv1.ScalingScheduleList, *applyconfigurationzalandoorgv1.ScalingScheduleApplyConfiguration]
}
// newScalingSchedules returns a ScalingSchedules
func newScalingSchedules(c *ZalandoV1Client, namespace string) *scalingSchedules {
return &scalingSchedules{
gentype.NewClientWithList[*zalandoorgv1.ScalingSchedule, *zalandoorgv1.ScalingScheduleList](
gentype.NewClientWithListAndApply[*zalandoorgv1.ScalingSchedule, *zalandoorgv1.ScalingScheduleList, *applyconfigurationzalandoorgv1.ScalingScheduleApplyConfiguration](
"scalingschedules",
c.RESTClient(),
scheme.ParameterCodec,
@@ -97,6 +97,7 @@ func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Dur
// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory.
// Listers obtained via this SharedInformerFactory will be subject to the same filters
// as specified here.
//
// Deprecated: Please use NewSharedInformerFactoryWithOptions instead
func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory {
return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions))
@@ -204,7 +205,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal
//
// It is typically used like this:
//
// ctx, cancel := context.Background()
// ctx, cancel := context.WithCancel(context.Background())
// defer cancel()
// factory := NewSharedInformerFactory(client, resyncPeriod)
// defer factory.WaitForStop() // Returns immediately if nothing was started.

Some files were not shown because too many files have changed in this diff Show More