mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
This commit adds restrictive PodSecurityPolicy, which can be optionally created, so descheduler can be deployed on clusters with PodSecurityPolicy admission controller, but which do not ship default policies. Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
39 lines
865 B
YAML
39 lines
865 B
YAML
{{- if .Values.podSecurityPolicy.create -}}
|
|
apiVersion: policy/v1beta1
|
|
kind: PodSecurityPolicy
|
|
metadata:
|
|
name: {{ template "descheduler.fullname" . }}
|
|
annotations:
|
|
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
|
|
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default'
|
|
spec:
|
|
privileged: false
|
|
allowPrivilegeEscalation: false
|
|
requiredDropCapabilities:
|
|
- ALL
|
|
volumes:
|
|
- 'configMap'
|
|
- 'secret'
|
|
hostNetwork: false
|
|
hostIPC: false
|
|
hostPID: false
|
|
runAsUser:
|
|
rule: 'MustRunAs'
|
|
ranges:
|
|
- min: 1
|
|
max: 65535
|
|
seLinux:
|
|
rule: 'RunAsAny'
|
|
supplementalGroups:
|
|
rule: 'MustRunAs'
|
|
ranges:
|
|
- min: 1
|
|
max: 65535
|
|
fsGroup:
|
|
rule: 'MustRunAs'
|
|
ranges:
|
|
- min: 1
|
|
max: 65535
|
|
readOnlyRootFilesystem: true
|
|
{{- end -}}
|