From d106662bc9731b236f946bb4ee4005776e646f20 Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Fri, 21 Mar 2025 12:48:59 +0100
Subject: [PATCH] Fix update wiki

---
 deploy/df-wiki/templates/deployment.yaml | 27 ++++++++++++++++--------
 deploy/df-wiki/values.yaml               |  3 +--
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml
index fbb5031e..b400b90d 100644
--- a/deploy/df-wiki/templates/deployment.yaml
+++ b/deploy/df-wiki/templates/deployment.yaml
@@ -29,6 +29,14 @@ spec:
       serviceAccountName: {{ include "df-wiki.serviceAccountName" . }}
       securityContext:
         {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      initContainers:
+        - name: init-directory
+          image: busybox
+          command: ["/bin/sh", "-c"]
+          args: ["mkdir -p /struct/wiki"]
+          volumeMounts:
+            - name: structure-data-pvc
+              mountPath: /struct
       containers:
         - name: {{ .Chart.Name }}
           securityContext:
@@ -39,23 +47,24 @@ spec:
             - name: http
               containerPort: {{ .Values.service.port }}
               protocol: TCP
-          livenessProbe:
-            httpGet:
-              path: /wiki/
-              port: http
-          readinessProbe:
-            httpGet:
-              path: /wiki/
-              port: http
+          # livenessProbe:
+          #   httpGet:
+          #     path: /
+          #     port: http
+          # readinessProbe:
+          #   httpGet:
+          #     path: /
+          #     port: http
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
           volumeMounts:
           - mountPath: /tmp
             name: tmp
           - name: nginx-config
-            mountPath: /etc/nginx/conf.d/
+            mountPath: /etc/nginx/conf.d
           - name: structure-data-pvc
             mountPath: /usr/share/nginx/html
+            subPath: wiki
           - name: website-pvc
             mountPath: /website
           
diff --git a/deploy/df-wiki/values.yaml b/deploy/df-wiki/values.yaml
index 5a8096dc..b979c7e9 100644
--- a/deploy/df-wiki/values.yaml
+++ b/deploy/df-wiki/values.yaml
@@ -28,8 +28,7 @@ serviceAccount:
 podAnnotations: {}
 
 podSecurityContext:
-  {}
-  # fsGroup: 2000
+  fsGroup: 101
 
 securityContext:
   runAsNonRoot: true
-- 
GitLab