From faad90fe1b816a21e8ebb50d4d279bef55d7d2ff Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Wed, 2 Jun 2021 14:55:31 -0300 Subject: [PATCH] PloneCfg must have permission to write to data volume --- .../portalmodelo/v0.5.0/templates/plonecfg-job.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/charts/portalmodelo/v0.5.0/templates/plonecfg-job.yaml b/charts/portalmodelo/v0.5.0/templates/plonecfg-job.yaml index ebd3d52..03bebfe 100644 --- a/charts/portalmodelo/v0.5.0/templates/plonecfg-job.yaml +++ b/charts/portalmodelo/v0.5.0/templates/plonecfg-job.yaml @@ -23,6 +23,19 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} restartPolicy: Never + 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 containers: - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" name: {{ .Release.Name }}-plonecfg