mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 20:12:43 +00:00
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
# The ClusterRole to enable the Connect injector to get, list, watch and patch MutatingWebhookConfiguration.
|
|
{{- if and (not .Values.connectInject.certs.secretName) (or (and (ne (.Values.connectInject.enabled | toString) "-") .Values.connectInject.enabled) (and (eq (.Values.connectInject.enabled | toString) "-") .Values.global.enabled)) }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ template "consul.fullname" . }}-connect-injector-webhook
|
|
labels:
|
|
app: {{ template "consul.name" . }}
|
|
chart: {{ template "consul.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
rules:
|
|
- apiGroups: ["admissionregistration.k8s.io"]
|
|
resources: ["mutatingwebhookconfigurations"]
|
|
verbs:
|
|
- "get"
|
|
- "list"
|
|
- "watch"
|
|
- "patch"
|
|
{{- if .Values.global.enablePodSecurityPolicies }}
|
|
- apiGroups: ["policy"]
|
|
resources: ["podsecuritypolicies"]
|
|
resourceNames:
|
|
- {{ template "consul.fullname" . }}-connect-injector-webhook
|
|
verbs:
|
|
- use
|
|
{{- end }}
|
|
{{- if and .Values.global.bootstrapACLs .Values.global.enableConsulNamespaces }}
|
|
- apiGroups: [""]
|
|
resources:
|
|
- secrets
|
|
resourceNames:
|
|
- {{ template "consul.fullname" . }}-connect-inject-acl-token
|
|
verbs:
|
|
- get
|
|
{{- end }}
|
|
{{- end }}
|