From eff6622c335a111846c35faa9bbf00000b489b69 Mon Sep 17 00:00:00 2001
From: Michael Koch <michael.koch@open-xchange.com>
Date: Tue, 12 Mar 2024 13:12:55 +0100
Subject: [PATCH] Changed: Helm: Make security context configuration
 overwritable

---
 helm/core-user-guide/Chart.yaml                | 4 ++--
 helm/core-user-guide/templates/deployment.yaml | 2 +-
 helm/core-user-guide/values.yaml               | 8 ++++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/helm/core-user-guide/Chart.yaml b/helm/core-user-guide/Chart.yaml
index 1eb77e2fa..a87930649 100644
--- a/helm/core-user-guide/Chart.yaml
+++ b/helm/core-user-guide/Chart.yaml
@@ -15,7 +15,7 @@ type: application
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 2.24.0
+version: 2.24.1
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to
@@ -24,5 +24,5 @@ version: 2.24.0
 appVersion: "8.24.0"
 dependencies:
   - name: ox-common
-    version: ~1.0.33
+    version: ~1.0.38
     repository: "oci://registry.open-xchange.com/appsuite-core-internal/charts"
diff --git a/helm/core-user-guide/templates/deployment.yaml b/helm/core-user-guide/templates/deployment.yaml
index be99309e7..1818e79a1 100644
--- a/helm/core-user-guide/templates/deployment.yaml
+++ b/helm/core-user-guide/templates/deployment.yaml
@@ -17,7 +17,7 @@ spec:
     spec: {{ include "ox-common.pods.podSpec" (dict "podRoot" .Values "global" $ "context" . ) | nindent 6 }}
       containers:
         - name: main
-          securityContext: {{ toYaml .Values.securityContext | nindent 12 }}
+          {{- include "ox-common.containers.securityContext" (dict "podRoot" .Values "context" . "global" $) | nindent 10 }}
           image: {{ include "ox-common.images.image" (dict "imageRoot" .Values.image "global" $ "context" . ) }}
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           ports:
diff --git a/helm/core-user-guide/values.yaml b/helm/core-user-guide/values.yaml
index da8835427..b89198aed 100644
--- a/helm/core-user-guide/values.yaml
+++ b/helm/core-user-guide/values.yaml
@@ -18,12 +18,16 @@ fullnameOverride: ""
 
 podAnnotations: {}
 
-podSecurityContext:
+podSecurityContext: {}
+
+defaultPodSecurityContext:
   runAsNonRoot: true
   runAsUser: 1000
   runAsGroup: 1000
 
-securityContext:
+securityContext: {}
+
+defaultSecurityContext:
   runAsNonRoot: true
   runAsUser: 1000
   runAsGroup: 1000
-- 
GitLab