mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 20:12:43 +00:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
{{- if (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) }}
|
|
{{- if .Values.global.bootstrapACLs }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ template "consul.fullname" . }}-server-acl-init
|
|
labels:
|
|
app: {{ template "consul.name" . }}
|
|
chart: {{ template "consul.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources:
|
|
- pods
|
|
verbs:
|
|
- list
|
|
- apiGroups: [""]
|
|
resources:
|
|
- secrets
|
|
verbs:
|
|
- create
|
|
- get
|
|
- apiGroups: ["apps"]
|
|
resources:
|
|
- statefulsets
|
|
verbs:
|
|
- get
|
|
{{- if .Values.connectInject.enabled }}
|
|
- apiGroups: [""]
|
|
resources:
|
|
- serviceaccounts
|
|
verbs:
|
|
- get
|
|
- apiGroups: [""]
|
|
resources:
|
|
- services
|
|
verbs:
|
|
- get
|
|
{{- end }}
|
|
{{- if .Values.global.enablePodSecurityPolicies }}
|
|
- apiGroups: ["policy"]
|
|
resources: ["podsecuritypolicies"]
|
|
resourceNames:
|
|
- {{ template "consul.fullname" . }}-server-acl-init
|
|
verbs:
|
|
- use
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|