2021-05-17 22:30:18 +00:00
|
|
|
--- charts-original/templates/podsecuritypolicy.yaml
|
|
|
|
+++ charts/templates/podsecuritypolicy.yaml
|
2021-06-26 00:16:30 +00:00
|
|
|
@@ -6,30 +6,15 @@
|
2021-05-17 22:30:18 +00:00
|
|
|
namespace: {{ template "grafana.namespace" . }}
|
|
|
|
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 }}
|
|
|
|
+{{- if .Values.rbac.pspAnnotations }}
|
|
|
|
+ annotations: {{ toYaml .Values.rbac.pspAnnotations | nindent 4 }}
|
|
|
|
+{{- end }}
|
|
|
|
spec:
|
|
|
|
privileged: false
|
|
|
|
allowPrivilegeEscalation: false
|
2021-06-26 00:16:30 +00:00
|
|
|
requiredDropCapabilities:
|
|
|
|
- # Default set from Docker, without DAC_OVERRIDE or CHOWN
|
|
|
|
- - FOWNER
|
|
|
|
- - FSETID
|
|
|
|
- - KILL
|
|
|
|
- - SETGID
|
|
|
|
- - SETUID
|
|
|
|
- - SETPCAP
|
|
|
|
- - NET_BIND_SERVICE
|
|
|
|
- - NET_RAW
|
|
|
|
- - SYS_CHROOT
|
|
|
|
- - MKNOD
|
|
|
|
- - AUDIT_WRITE
|
|
|
|
- - SETFCAP
|
|
|
|
+ # Default set from Docker, with DAC_OVERRIDE and CHOWN
|
|
|
|
+ - ALL
|
|
|
|
volumes:
|
|
|
|
- 'configMap'
|
|
|
|
- 'emptyDir'
|
|
|
|
@@ -42,12 +27,20 @@
|
|
|
|
hostIPC: false
|
|
|
|
hostPID: false
|
|
|
|
runAsUser:
|
|
|
|
- rule: 'RunAsAny'
|
|
|
|
+ rule: 'MustRunAsNonRoot'
|
|
|
|
seLinux:
|
|
|
|
rule: 'RunAsAny'
|
|
|
|
supplementalGroups:
|
|
|
|
- rule: 'RunAsAny'
|
|
|
|
+ rule: 'MustRunAs'
|
|
|
|
+ ranges:
|
|
|
|
+ # Forbid adding the root group.
|
|
|
|
+ - min: 1
|
|
|
|
+ max: 65535
|
|
|
|
fsGroup:
|
|
|
|
- rule: 'RunAsAny'
|
|
|
|
+ rule: 'MustRunAs'
|
|
|
|
+ ranges:
|
|
|
|
+ # Forbid adding the root group.
|
|
|
|
+ - min: 1
|
|
|
|
+ max: 65535
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
{{- end }}
|