
* 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>
24 lines
904 B
YAML
24 lines
904 B
YAML
{{ 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
|
|
labels:
|
|
helm.sh/chart: {{ include "vault.chart" . }}
|
|
app.kubernetes.io/name: {{ include "vault.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: system:auth-delegator
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ template "vault.serviceAccount.name" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
{{ end }}
|