Closed p4block closed 1 year ago
How did you generate the output YAML? It should already be generating autoscaling/v2
for Kube > 1.23:
{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta1
{{- end }}
If you are using helm template
, please ensure you are passing in --kube-version 1.26
to give it that context. I suspect that's what's happening here.
You're right, I was using helm template
to avoid the TLS indentation problem in the other issue and I didn't know of the kube-version flag. I wrongly assumed it would query the current cluster for the version :/
Thanks a lot
autoscaling/v2beta1
is deprecated and the helmchart tried to generate it. I've modified the output yaml for the new spec manually: