From 666f7de6a1feb3fe93e04e75dd1bfb430dfd5e2b Mon Sep 17 00:00:00 2001 From: portdirect Date: Wed, 10 Jan 2018 13:05:36 -0500 Subject: [PATCH] Prometheus-Alertmanager: Fix permisions for PVC This PS fixes the permisions for the PVC backing Prometheus-Alertmanager Change-Id: I8cfb2b999c1f2add9c1647238603c3940ef0bc0a --- prometheus-alertmanager/templates/statefulset.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/prometheus-alertmanager/templates/statefulset.yaml b/prometheus-alertmanager/templates/statefulset.yaml index f6474c7fb..fba99414d 100644 --- a/prometheus-alertmanager/templates/statefulset.yaml +++ b/prometheus-alertmanager/templates/statefulset.yaml @@ -51,6 +51,19 @@ spec: terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.alertmanager.timeout | default "30" }} initContainers: {{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + - name: alertmanager-perms +{{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }} + securityContext: + runAsUser: 0 +{{ tuple $envAll $envAll.Values.pod.resources.alertmanager | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - chown + - -R + - "nobody:" + - /var/lib/alertmanager/data + volumeMounts: + - name: storage + mountPath: /var/lib/alertmanager/data containers: - name: alertmanager {{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }}