From 3f123092da8d5d89973bc52a775650500ee8ca36 Mon Sep 17 00:00:00 2001 From: pierremahot Date: Thu, 31 Oct 2024 15:05:50 +0100 Subject: [PATCH] add pod context security --- charts/metabase/README.md | 3 ++- charts/metabase/templates/deployment.yaml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/metabase/README.md b/charts/metabase/README.md index 40cf562..3608db0 100644 --- a/charts/metabase/README.md +++ b/charts/metabase/README.md @@ -151,6 +151,7 @@ The following table lists the configurable parameters of the Metabase chart and | extraEnv | Mapping of extra environment variables | {} | | envFrom | Mapping of extra environment variables from secret and/or configMap | [] | | sidecars | Mapping of container sidecars for the main deployment | [] | -| securityContext | Security Context for the Metabase pod | {} | +| securityContext | Security Context for the Metabase container | {} | +| podSecurityContext | Security Context for the Metabase pod | {} | The above parameters map to the env variables defined in [metabase](http://github.com/metabase/metabase). For more information please refer to the [metabase documentations](https://www.metabase.com/docs/v0.41/operations-guide/environment-variables.html). diff --git a/charts/metabase/templates/deployment.yaml b/charts/metabase/templates/deployment.yaml index 9df3fe6..b33b080 100644 --- a/charts/metabase/templates/deployment.yaml +++ b/charts/metabase/templates/deployment.yaml @@ -311,6 +311,9 @@ spec: {{- if .Values.sidecars }} {{ toYaml .Values.sidecars | nindent 8 }} {{- end }} + {{- if .Values.podSecurityContext}} + securityContext: + {{- .Values.securityContext | toYaml | nindent 8 }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }}