40 lines
1014 B
YAML
40 lines
1014 B
YAML
{{- if .Values.podSecurityPolicy.create }}
|
|
apiVersion: policy/v1beta1
|
|
kind: PodSecurityPolicy
|
|
metadata:
|
|
name: {{ template "elastalert.fullname" . }}
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
# Prevents running in privileged mode
|
|
privileged: false
|
|
# Required to prevent escalations to root.
|
|
allowPrivilegeEscalation: false
|
|
volumes:
|
|
- configMap
|
|
- secret
|
|
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 }}
|