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