blob: 858df8ff287a7b776d855242583e7d6c1524e9ce [file] [log] [blame]
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +04001{{- if .Values.global.podSecurityPolicy.enabled }}
2apiVersion: rbac.authorization.k8s.io/v1
3kind: ClusterRoleBinding
4metadata:
5 name: {{ template "webhook.fullname" . }}-psp
6 labels:
7 app: {{ include "webhook.name" . }}
8 app.kubernetes.io/name: {{ include "webhook.name" . }}
9 app.kubernetes.io/instance: {{ .Release.Name }}
10 app.kubernetes.io/component: "webhook"
11 {{- include "labels" . | nindent 4 }}
12roleRef:
13 apiGroup: rbac.authorization.k8s.io
14 kind: ClusterRole
15 name: {{ template "webhook.fullname" . }}-psp
16subjects:
17 - kind: ServiceAccount
18 name: {{ template "webhook.serviceAccountName" . }}
19 namespace: {{ include "cert-manager.namespace" . }}
20{{- end }}