Skip to content

Commit

Permalink
issue-759: Changed version selection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
shunki-fujita committed Nov 28, 2024
1 parent 8a090b1 commit 71f6a54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts/moco/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Return the appropriate apiVersion for admissionregistration.
*/}}
{{- define "admissionregistration.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "admissionregistration.k8s.io/v1" -}}
admissionregistration.k8s.io/v1
{{- else -}}
{{- if (lt (int .Capabilities.KubeVersion.Minor) 30) -}}
admissionregistration.k8s.io/v1beta1
{{- else -}}
admissionregistration.k8s.io/v1
{{- end }}
{{- end }}

0 comments on commit 71f6a54

Please sign in to comment.