blob: dacd4be27850b66fd2deea4de3c5713887e35f04 [file] [log] [blame]
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +04001{{- if .Values.startupapicheck.enabled }}
2{{- if .Values.global.podSecurityPolicy.enabled }}
3kind: ClusterRole
4apiVersion: rbac.authorization.k8s.io/v1
5metadata:
6 name: {{ template "startupapicheck.fullname" . }}-psp
7 labels:
8 app: {{ include "startupapicheck.name" . }}
9 app.kubernetes.io/name: {{ include "startupapicheck.name" . }}
10 app.kubernetes.io/instance: {{ .Release.Name }}
11 app.kubernetes.io/component: "startupapicheck"
12 {{- include "labels" . | nindent 4 }}
13 {{- with .Values.startupapicheck.rbac.annotations }}
14 annotations:
15 {{- toYaml . | nindent 4 }}
16 {{- end }}
17rules:
18- apiGroups: ['policy']
19 resources: ['podsecuritypolicies']
20 verbs: ['use']
21 resourceNames:
22 - {{ template "startupapicheck.fullname" . }}
23{{- end }}
24{{- end }}