Merge "prometheus-alertmanager: Add container security context"

This commit is contained in:
Zuul 2019-03-22 05:44:19 +00:00 committed by Gerrit Code Review
commit 2b1e7ebc21
2 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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: