Skip to content

Commit b0eb087

Browse files
committed
add support for rbac v1 API endpoint
kubernetes >=1.8 moved rbac to v1
1 parent 297a5d1 commit b0eb087

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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