123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- {{- if .Values.rbac.pspEnabled }}
- {{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
- apiVersion: policy/v1beta1
- kind: PodSecurityPolicy
- metadata:
- name: {{ template "grafana.fullname" . }}
- labels:
- {{- include "grafana.labels" . | nindent 4 }}
- annotations:
- seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
- seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
- {{- if .Values.rbac.pspUseAppArmor }}
- apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
- apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
- {{- end }}
- spec:
- privileged: false
- allowPrivilegeEscalation: false
- requiredDropCapabilities:
- # Default set from Docker, with DAC_OVERRIDE and CHOWN
- - ALL
- volumes:
- - 'configMap'
- - 'emptyDir'
- - 'projected'
- - 'csi'
- - 'secret'
- - 'downwardAPI'
- - 'persistentVolumeClaim'
- hostNetwork: false
- hostIPC: false
- hostPID: false
- runAsUser:
- rule: 'RunAsAny'
- seLinux:
- rule: 'RunAsAny'
- supplementalGroups:
- rule: 'MustRunAs'
- ranges:
- # Forbid adding the root group.
- - min: 1
- max: 65535
- fsGroup:
- rule: 'MustRunAs'
- ranges:
- # Forbid adding the root group.
- - min: 1
- max: 65535
- readOnlyRootFilesystem: false
- {{- end }}
- {{- end }}
|