prometheus-alertmanager: Add container security context
This adds the container security context to set readOnlyRootFilesystem to true Change-Id: Ic8d33ae817ace49bf5ead40b2b41c6002217aa5e
This commit is contained in:
parent
ce8a75afa5
commit
aeda85c642
@ -47,8 +47,6 @@ spec:
|
||||
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
{{ dict "envAll" $envAll "podName" "alertmanager" "containerNames" (list "alertmanager") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
||||
spec:
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
{{ dict "envAll" $envAll "application" "alertmanager" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||
serviceAccountName: {{ $serviceAccountName }}
|
||||
affinity:
|
||||
@ -75,8 +73,7 @@ spec:
|
||||
- name: alertmanager
|
||||
{{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.alertmanager | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
{{ dict "envAll" $envAll "application" "alertmanager" "container" "alertmanager" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||
command:
|
||||
- /tmp/alertmanager.sh
|
||||
- start
|
||||
|
@ -42,9 +42,14 @@ pod:
|
||||
type: apparmor
|
||||
alertmanager:
|
||||
alertmanager: localhost/docker-default
|
||||
user:
|
||||
security_context:
|
||||
alertmanager:
|
||||
uid: 65534
|
||||
pod:
|
||||
runAsUser: 65534
|
||||
container:
|
||||
alertmanager:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
affinity:
|
||||
anti:
|
||||
type:
|
||||
|
Loading…
Reference in New Issue
Block a user