mirror of
https://github.com/bitnami/charts.git
synced 2026-04-01 06:47:23 +08:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
{{- if .Values.podSecurityPolicy.enabled}}
|
|
apiVersion: policy/v1beta1
|
|
kind: PodSecurityPolicy
|
|
metadata:
|
|
name: {{ template "nginx-ingress.fullname" . }}
|
|
labels:
|
|
app: {{ template "nginx-ingress.name" . }}
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
allowedCapabilities:
|
|
- NET_BIND_SERVICE
|
|
privileged: false
|
|
allowPrivilegeEscalation: true
|
|
# Allow core volume types.
|
|
volumes:
|
|
- 'configMap'
|
|
#- 'emptyDir'
|
|
#- 'projected'
|
|
- 'secret'
|
|
#- 'downwardAPI'
|
|
hostNetwork: {{ .Values.hostNetwork }}
|
|
hostIPC: false
|
|
hostPID: false
|
|
runAsUser:
|
|
# Require the container to run without root privileges.
|
|
rule: 'MustRunAsNonRoot'
|
|
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
|
|
seLinux:
|
|
rule: 'RunAsAny'
|
|
hostPorts:
|
|
- max: 65535
|
|
min: 1
|
|
{{- end }}
|