Skip to content

Commit

Permalink
Merge pull request #1 from n0n0x/add-rbac-v1-support
Browse files Browse the repository at this point in the history
add support for rbac v1 API endpoint
  • Loading branch information
Cryptophobia authored Jan 30, 2018
2 parents c69d934 + cf54816 commit f665b8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions charts/builder/templates/_helpers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
Set apiVersion based on Kubernetes version
*/}}
{{- define "rbacAPIVersion" -}}
{{- if ge .Capabilities.KubeVersion.Minor "6" -}}
{{- if lt .Capabilities.KubeVersion.Minor "6" -}}
rbac.authorization.k8s.io/v1alpha1
{{- else if (and (ge .Capabilities.KubeVersion.Minor "6") (le .Capabilities.KubeVersion.Minor "7")) -}}
rbac.authorization.k8s.io/v1beta1
{{- else -}}
rbac.authorization.k8s.io/v1alpha1
rbac.authorization.k8s.io/v1
{{- end -}}
{{- end -}}

0 comments on commit f665b8c

Please sign in to comment.