mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 12:02:47 +00:00
23 lines
688 B
YAML
23 lines
688 B
YAML
{{- if (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ template "consul.fullname" . }}-server
|
|
labels:
|
|
app: {{ template "consul.name" . }}
|
|
chart: {{ template "consul.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
{{- if .Values.global.enablePodSecurityPolicies }}
|
|
rules:
|
|
- apiGroups: ["policy"]
|
|
resources: ["podsecuritypolicies"]
|
|
resourceNames:
|
|
- {{ template "consul.fullname" . }}-server
|
|
verbs:
|
|
- use
|
|
{{- else }}
|
|
rules: []
|
|
{{- end }}
|
|
{{- end }}
|