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" }}
|
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 }}
|
{{ dict "envAll" $envAll "podName" "alertmanager" "containerNames" (list "alertmanager") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
{{ dict "envAll" $envAll "application" "alertmanager" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
{{ dict "envAll" $envAll "application" "alertmanager" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
affinity:
|
affinity:
|
||||||
@ -75,8 +73,7 @@ spec:
|
|||||||
- name: alertmanager
|
- name: alertmanager
|
||||||
{{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ 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 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.alertmanager | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
securityContext:
|
{{ dict "envAll" $envAll "application" "alertmanager" "container" "alertmanager" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
command:
|
command:
|
||||||
- /tmp/alertmanager.sh
|
- /tmp/alertmanager.sh
|
||||||
- start
|
- start
|
||||||
|
@ -42,9 +42,14 @@ pod:
|
|||||||
type: apparmor
|
type: apparmor
|
||||||
alertmanager:
|
alertmanager:
|
||||||
alertmanager: localhost/docker-default
|
alertmanager: localhost/docker-default
|
||||||
user:
|
security_context:
|
||||||
alertmanager:
|
alertmanager:
|
||||||
uid: 65534
|
pod:
|
||||||
|
runAsUser: 65534
|
||||||
|
container:
|
||||||
|
alertmanager:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
affinity:
|
affinity:
|
||||||
anti:
|
anti:
|
||||||
type:
|
type:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user