From ef9b37e83614d5bb43b5f2f5efa3dbeb13882f05 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Fri, 9 Apr 2021 14:42:31 -0300 Subject: [PATCH] Fix permission issue in non-NFS volumes --- .../v0.5.0/templates/zeoserver-deployment.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml b/charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml index 466eda4..aa5a784 100644 --- a/charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml +++ b/charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml @@ -28,6 +28,18 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: + - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + name: {{ .Release.Name }}-chownplone + command: + - "chown" + - "plone:plone" + - "/data" + securityContext: + runAsNonRoot: false + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: data - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" name: {{ .Release.Name }}-rmlock command: