blob: 54d5a42d642a8877eda1865071825ccc3e3ed16a [file] [log] [blame]
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +04001{{- if .Values.startupapicheck.enabled }}
2{{- if .Values.global.podSecurityPolicy.enabled }}
3apiVersion: rbac.authorization.k8s.io/v1
4kind: ClusterRoleBinding
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 }}
17roleRef:
18 apiGroup: rbac.authorization.k8s.io
19 kind: ClusterRole
20 name: {{ template "startupapicheck.fullname" . }}-psp
21subjects:
22 - kind: ServiceAccount
23 name: {{ template "startupapicheck.serviceAccountName" . }}
24 namespace: {{ include "cert-manager.namespace" . }}
25{{- end }}
26{{- end }}