netbox-chart
netbox-chart copied to clipboard
autoscaling/v2beta1 is no longer available in current kubernetes 1.25
W0909 13:41:26.043561 3885 warnings.go:70] autoscaling/v2beta1 HorizontalPodAutoscaler is deprecated in v1.22+, unavailable in v1.25+; use autoscaling/v2 HorizontalPodAutoscaler
expectation is to use proper api reference as autoscaling would not working in the last release of kubernetes
Error: UPGRADE FAILED: resource mapping not found for name: "netbox-netbox-worker" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
ensure CRDs are installed first
indeed it fails on kubernetes 1.25
This should be simple enough to fix with a similar set of conditions as the CronJob resource.
According to the deprecated API migration guide, v1.23+ supports the autoscaling/v2 API version, so something along the lines of
{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: batch/v2
{{- else -}}
apiVersion: autoscaling/v2beta1
{{- end }}
should do the trick.
v2 will be removed in 1.26. We should use stable versions: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#api-object
and since 1.26 is out now, we should be looking into fixing this.
This looks like it'll be resolved in the upcoming 5.0.0-release: 664c10b05d80ff8ee950d54aafd5aaf6c1c701ee.
Closing as fixed in 5.0.0 releases