psp related fixes for prom2teams chart

pull/2259/head
vardhaman 2022-12-15 12:26:50 +05:30
parent a35ead5b2d
commit 3707d97332
3 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
@ -27,3 +28,4 @@ spec:
volumes:
- 'configMap'
- 'secret'
{{- end }}

View File

@ -1,3 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@ -13,3 +14,4 @@ rules:
- podsecuritypolicies
verbs:
- use
{{- end }}

View File

@ -1,3 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
@ -11,3 +12,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "prom2teams.fullname" . }}
{{- end }}