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 apiVersion: policy/v1beta1
kind: PodSecurityPolicy kind: PodSecurityPolicy
metadata: metadata:
@ -27,3 +28,4 @@ spec:
volumes: volumes:
- 'configMap' - 'configMap'
- 'secret' - 'secret'
{{- end }}

View File

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

View File

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