blob: f6fa4c55e5b67f2fcdf943342e87cd71d1ce1ba2 [file] [log] [blame]
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +04001{{- if .Values.global.podSecurityPolicy.enabled }}
2kind: ClusterRole
3apiVersion: rbac.authorization.k8s.io/v1
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 }}
12rules:
13- apiGroups: ['policy']
14 resources: ['podsecuritypolicies']
15 verbs: ['use']
16 resourceNames:
17 - {{ template "webhook.fullname" . }}
18{{- end }}