From a1ed2a32060ba624cc4031c01fa7fc3dcc30dee4 Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 20 Mar 2025 17:12:36 +0100
Subject: [PATCH 1/5] create a subPath for structure-data-pvc

---
 deploy/df-wiki/templates/deployment.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml
index fbb5031e..f8d154fb 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:
@@ -56,6 +64,7 @@ spec:
             mountPath: /etc/nginx/conf.d/
           - name: structure-data-pvc
             mountPath: /usr/share/nginx/html
+            subPath: wiki
           - name: website-pvc
             mountPath: /website
           
-- 
GitLab


From 38ecb784b7fb62c879acbcdccd90e7088733a2eb Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 20 Mar 2025 17:29:01 +0100
Subject: [PATCH 2/5] fsGroup -> 101

---
 deploy/df-wiki/values.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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


From 0686adbdec652fd30557ab1ede201ae6149d041c Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 20 Mar 2025 18:13:12 +0100
Subject: [PATCH 3/5] chown 101

---
 deploy/df-wiki/templates/deployment.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml
index f8d154fb..9b65fc97 100644
--- a/deploy/df-wiki/templates/deployment.yaml
+++ b/deploy/df-wiki/templates/deployment.yaml
@@ -33,7 +33,7 @@ spec:
         - name: init-directory
           image: busybox
           command: ["/bin/sh", "-c"]
-          args: ["mkdir -p /struct/wiki"]
+          args: ["mkdir -p /struct/wiki", "chown -R 101:101 /struct/wiki"]
           volumeMounts:
             - name: structure-data-pvc
               mountPath: /struct
@@ -49,11 +49,11 @@ spec:
               protocol: TCP
           livenessProbe:
             httpGet:
-              path: /wiki/
+              path: /wiki
               port: http
           readinessProbe:
             httpGet:
-              path: /wiki/
+              path: /wiki
               port: http
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
@@ -61,7 +61,7 @@ spec:
           - 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
-- 
GitLab


From eb84cff14ceeb0ef3b369c4db2f5b90ff51468bd Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 20 Mar 2025 18:26:22 +0100
Subject: [PATCH 4/5] create fake index

---
 deploy/df-wiki/templates/deployment.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml
index 9b65fc97..e38fd035 100644
--- a/deploy/df-wiki/templates/deployment.yaml
+++ b/deploy/df-wiki/templates/deployment.yaml
@@ -33,7 +33,7 @@ spec:
         - name: init-directory
           image: busybox
           command: ["/bin/sh", "-c"]
-          args: ["mkdir -p /struct/wiki", "chown -R 101:101 /struct/wiki"]
+          args: ["mkdir -p /struct/wiki", "touch /struct/wiki/index.html", "chown -R 101:101 /struct/wiki"]
           volumeMounts:
             - name: structure-data-pvc
               mountPath: /struct
@@ -49,11 +49,11 @@ spec:
               protocol: TCP
           livenessProbe:
             httpGet:
-              path: /wiki
+              path: /
               port: http
           readinessProbe:
             httpGet:
-              path: /wiki
+              path: /
               port: http
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
-- 
GitLab


From 4382dcea510df9d15a6eab1c869e56f342f5a5f7 Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 20 Mar 2025 19:05:08 +0100
Subject: [PATCH 5/5] no probes

---
 deploy/df-wiki/templates/deployment.yaml | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml
index e38fd035..b400b90d 100644
--- a/deploy/df-wiki/templates/deployment.yaml
+++ b/deploy/df-wiki/templates/deployment.yaml
@@ -33,7 +33,7 @@ spec:
         - name: init-directory
           image: busybox
           command: ["/bin/sh", "-c"]
-          args: ["mkdir -p /struct/wiki", "touch /struct/wiki/index.html", "chown -R 101:101 /struct/wiki"]
+          args: ["mkdir -p /struct/wiki"]
           volumeMounts:
             - name: structure-data-pvc
               mountPath: /struct
@@ -47,14 +47,14 @@ spec:
             - name: http
               containerPort: {{ .Values.service.port }}
               protocol: TCP
-          livenessProbe:
-            httpGet:
-              path: /
-              port: http
-          readinessProbe:
-            httpGet:
-              path: /
-              port: http
+          # livenessProbe:
+          #   httpGet:
+          #     path: /
+          #     port: http
+          # readinessProbe:
+          #   httpGet:
+          #     path: /
+          #     port: http
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
           volumeMounts:
-- 
GitLab