Update rbac api version to v1 (#395)

* fix(rbac): update api version on rbac

* Update templates/server-clusterrolebinding.yaml

Co-authored-by: Yong Wen Chua <lawliet89@users.noreply.github.com>

* Update server-discovery-rolebinding.yaml

Co-authored-by: Yong Wen Chua <lawliet89@users.noreply.github.com>
This commit is contained in:
Chris Pieper 2020-12-07 10:07:02 -05:00 committed by GitHub
parent f6c9d5837b
commit f780877e1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -1,6 +1,10 @@
{{ template "vault.mode" . }}
{{- if and (ne .mode "") (and (eq (.Values.global.enabled | toString) "true") (eq (.Values.server.authDelegator.enabled | toString) "true")) }}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" -}}
apiVersion: rbac.authorization.k8s.io/v1
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- end }}
kind: ClusterRoleBinding
metadata:
name: {{ template "vault.fullname" . }}-server-binding

View file

@ -1,7 +1,11 @@
{{ template "vault.mode" . }}
{{- if ne .mode "external" }}
{{- if and (eq .mode "ha" ) (eq (.Values.global.enabled | toString) "true") }}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" -}}
apiVersion: rbac.authorization.k8s.io/v1
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- end }}
kind: RoleBinding
metadata:
name: {{ template "vault.fullname" . }}-discovery-rolebinding