psp related fixes for rancher-sachet chart

pull/2259/head
vardhaman 2022-12-20 08:56:22 +05:30
parent 3707d97332
commit 605469c603
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 "sachet.fullname" . }}
{{- end }}