diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml index fbb5031e1d9fa1777e2766b292edf0547643f0a5..f8d154fb394db1328935fe0303dd0f1f59676ba3 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