Change from autoscaling/v2beta2 на apiVersion: autoscaling/v2
The best way is to make it variable according to the needs of users.
Steps to reproduce
Using kubernetes version higher than 1.26
Steps to take
apiVersion: {{ .Values.hpa.apiVersion | default "autoscaling/v2beta2" }}
or if you want to make it extensible to a kubernetes cluster, you can make it with the helm Capabilities
.Capabilities.KubeVersion.Version
Describe the bug
Deprecated API for the
kind: HorizontalPodAutoscaler
in a newer versions of Kubernetes.Expected behavior
Change from
autoscaling/v2beta2
на apiVersion:autoscaling/v2
The best way is to make it variable according to the needs of users.Steps to reproduce
Using kubernetes version higher than 1.26
Steps to take
apiVersion: {{ .Values.hpa.apiVersion | default "autoscaling/v2beta2" }}
or if you want to make it extensible to a kubernetes cluster, you can make it with the helm Capabilities.Capabilities.KubeVersion.Version
Your environment