24 lines
885 B
YAML
24 lines
885 B
YAML
{{- $serverEnabled := (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) -}}
|
|
{{- if (or $serverEnabled .Values.externalServers.enabled) }}
|
|
{{- if .Values.global.acls.manageSystemACLs }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: {{ template "consul.fullname" . }}-server-acl-init
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app: {{ template "consul.name" . }}
|
|
chart: {{ template "consul.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
component: server-acl-init
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: {{ template "consul.fullname" . }}-server-acl-init
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ template "consul.fullname" . }}-server-acl-init
|
|
{{- end }}
|
|
{{- end }}
|