From 0ae22f4c1c4b9886e5c4b48cc677620526533ea1 Mon Sep 17 00:00:00 2001 From: RAHUL KHIYANI Date: Mon, 22 Apr 2019 10:29:33 -0500 Subject: [PATCH] prometheus-kube-state-metrics: Fix security context This PS fixes the application name to holistic manner Change-Id: Ib68c6fc114962fd53a5fcd2ce9e79bfefd5d94a3 --- prometheus-kube-state-metrics/templates/deployment.yaml | 4 ++-- prometheus-kube-state-metrics/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prometheus-kube-state-metrics/templates/deployment.yaml b/prometheus-kube-state-metrics/templates/deployment.yaml index 84bde1c8b..60d03db75 100644 --- a/prometheus-kube-state-metrics/templates/deployment.yaml +++ b/prometheus-kube-state-metrics/templates/deployment.yaml @@ -111,7 +111,7 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} spec: -{{ dict "envAll" $envAll "application" "kube_state_metrics" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} +{{ dict "envAll" $envAll "application" "exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} nodeSelector: {{ .Values.labels.kube_state_metrics.node_selector_key }}: {{ .Values.labels.kube_state_metrics.node_selector_value | quote }} @@ -122,7 +122,7 @@ spec: - name: kube-state-metrics {{ tuple $envAll "kube_state_metrics" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.kube_state_metrics | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} -{{ dict "envAll" $envAll "application" "kube_state_metrics" "container" "kube_state_metrics" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} +{{ dict "envAll" $envAll "application" "exporter" "container" "kube_state_metrics" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} command: - /tmp/kube-state-metrics.sh ports: diff --git a/prometheus-kube-state-metrics/values.yaml b/prometheus-kube-state-metrics/values.yaml index 0f6b6d4f8..3fece3d90 100644 --- a/prometheus-kube-state-metrics/values.yaml +++ b/prometheus-kube-state-metrics/values.yaml @@ -38,7 +38,7 @@ labels: pod: security_context: - kube_state_metrics: + exporter: pod: runAsUser: 65534 container: