diff --git a/grafana/templates/deployment.yaml b/grafana/templates/deployment.yaml index 694dffef6..d42c7e8e7 100644 --- a/grafana/templates/deployment.yaml +++ b/grafana/templates/deployment.yaml @@ -44,8 +44,6 @@ spec: configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: - securityContext: - readOnlyRootFilesystem: true {{ dict "envAll" $envAll "application" "grafana" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} nodeSelector: @@ -56,8 +54,7 @@ spec: - name: grafana {{ tuple $envAll "grafana" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.grafana | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - securityContext: - allowPrivilegeEscalation: false +{{ dict "envAll" $envAll "application" "grafana" "container" "grafana" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} command: - /tmp/grafana.sh - start diff --git a/grafana/values.yaml b/grafana/values.yaml index 4eaaf06c5..274740940 100644 --- a/grafana/values.yaml +++ b/grafana/values.yaml @@ -43,9 +43,14 @@ labels: node_selector_value: enabled pod: - user: + security_context: grafana: - uid: 104 + pod: + runAsUser: 104 + container: + grafana: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true affinity: anti: type: