mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 20:12:43 +00:00
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
{{- if (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) }}
|
|
{{- if (and .Values.server.enterpriseLicense.secretName .Values.server.enterpriseLicense.secretKey) }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ template "consul.fullname" . }}-enterprise-license
|
|
labels:
|
|
app: {{ template "consul.name" . }}
|
|
chart: {{ template "consul.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
{{- if or .Values.global.bootstrapACLs .Values.global.enablePodSecurityPolicies }}
|
|
rules:
|
|
{{- if .Values.global.bootstrapACLs }}
|
|
- apiGroups: [""]
|
|
resources:
|
|
- secrets
|
|
resourceNames:
|
|
- {{ template "consul.fullname" . }}-enterprise-license-acl-token
|
|
verbs:
|
|
- get
|
|
{{- end }}
|
|
{{- if .Values.global.enablePodSecurityPolicies }}
|
|
- apiGroups: ["policy"]
|
|
resources: ["podsecuritypolicies"]
|
|
resourceNames:
|
|
- {{ template "consul.fullname" . }}-enterprise-license
|
|
verbs:
|
|
- use
|
|
{{- end }}
|
|
{{- else }}
|
|
rules: []
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|