3 SPDX-License-Identifier: APACHE-2.0
6 {{- if and (include "common.capabilities.psp.supported" .) .Values.podSecurityPolicy.create }}
7 apiVersion: policy/v1beta1
8 kind: PodSecurityPolicy
10 name: {{ include "mongodb.fullname" . }}
11 namespace: {{ include "mongodb.namespace" . | quote }}
12 labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
13 {{- if .Values.commonAnnotations }}
14 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
17 {{- if .Values.podSecurityPolicy.spec }}
18 {{ include "common.tplvalues.render" ( dict "value" .Values.podSecurityPolicy.spec "context" $ ) | nindent 2 }}
20 allowPrivilegeEscalation: {{ .Values.podSecurityPolicy.allowPrivilegeEscalation }}
24 - min: {{ .Values.podSecurityContext.fsGroup }}
25 max: {{ .Values.podSecurityContext.fsGroup }}
29 privileged: {{ .Values.podSecurityPolicy.privileged }}
30 readOnlyRootFilesystem: false
31 requiredDropCapabilities:
36 - min: {{ .Values.containerSecurityContext.runAsUser }}
37 max: {{ .Values.containerSecurityContext.runAsUser }}
43 - min: {{ .Values.containerSecurityContext.runAsUser }}
44 max: {{ .Values.containerSecurityContext.runAsUser }}
49 - 'persistentVolumeClaim'