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] 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