Skip to content

Commit 2bf9a23

Browse files
authored
Merge pull request #6 from n0n0x/add-rbac-v1-support
add support for rbac v1 API endpoint
2 parents c0d3d35 + ddbd8ac commit 2bf9a23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

charts/controller/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)