File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
helm/oauth2-proxy/templates Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -21,3 +21,14 @@ Return the appropriate apiVersion for ingress object.
2121{ {- print " networking.k8s.io/v1" -} }
2222{ {- end -} }
2323{ {- end -} }
24+
25+ { {/*
26+ Return the appropriate apiVersion for HorizontalPodAutoscaler object.
27+ */} }
28+ { {- define " capabilities.horizontalPodAutoscaler.apiVersion" -} }
29+ { {- if semverCompare " <1.23-0" ( .Values.kubeVersion | default .Capabilities.KubeVersion.Version ) -} }
30+ { {- print " autoscaling/v2beta2" -} }
31+ { {- else -} }
32+ { {- print " autoscaling/v2" -} }
33+ { {- end -} }
34+ { {- end -} }
Original file line number Diff line number Diff line change 11{{- if .Values.autoscaling.enabled }}
2- apiVersion : autoscaling/v2
2+ apiVersion : {{ include "capabilities.horizontalPodAutoscaler.apiVersion" . }}
33kind : HorizontalPodAutoscaler
44metadata :
55 labels :
You can’t perform that action at this time.
0 commit comments