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