| Giorgi Lekveishvili | d1234c1 | 2023-06-19 10:37:06 +0400 | [diff] [blame] | 1 | {{- if .Values.global.podSecurityPolicy.enabled }} |
| 2 | kind: ClusterRole |
| 3 | apiVersion: rbac.authorization.k8s.io/v1 |
| 4 | metadata: |
| 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 }} |
| 12 | rules: |
| 13 | - apiGroups: ['policy'] |
| 14 | resources: ['podsecuritypolicies'] |
| 15 | verbs: ['use'] |
| 16 | resourceNames: |
| 17 | - {{ template "webhook.fullname" . }} |
| Giorgi Lekveishvili | 0048a78 | 2023-06-20 18:32:21 +0400 | [diff] [blame^] | 18 | {{- end }} |