Skip to content

Commit cf54816

Browse files
committed
add support for rbac v1 API endpoint
kubernetes >=1.8 moved rbac API endpoint to v1
1 parent 68e8d78 commit cf54816

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

charts/builder/templates/_helpers.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
Set apiVersion based on Kubernetes version
33
*/}}
44
{{- define "rbacAPIVersion" -}}
5-
{{- if ge .Capabilities.KubeVersion.Minor "6" -}}
5+
{{- if lt .Capabilities.KubeVersion.Minor "6" -}}
6+
rbac.authorization.k8s.io/v1alpha1
7+
{{- else if (and (ge .Capabilities.KubeVersion.Minor "6") (le .Capabilities.KubeVersion.Minor "7")) -}}
68
rbac.authorization.k8s.io/v1beta1
79
{{- else -}}
8-
rbac.authorization.k8s.io/v1alpha1
10+
rbac.authorization.k8s.io/v1
911
{{- end -}}
1012
{{- end -}}

0 commit comments

Comments
 (0)