{{- if .Values.rbac.pspEnabled }} {{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: {{ include "loki.fullname" . }} labels: {{- include "loki.labels" . | nindent 4 }} spec: privileged: false allowPrivilegeEscalation: false volumes: - 'configMap' - 'emptyDir' - 'persistentVolumeClaim' - 'secret' hostNetwork: false hostIPC: false hostPID: false runAsUser: rule: 'MustRunAsNonRoot' seLinux: rule: 'RunAsAny' supplementalGroups: rule: 'MustRunAs' ranges: - min: 1 max: 65535 fsGroup: rule: 'MustRunAs' ranges: - min: 1 max: 65535 readOnlyRootFilesystem: true requiredDropCapabilities: - ALL {{- end }} {{- end }}