diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 0940498c1fbb03087901827449603c36c39b83fd..210b1f370f19a4151f1954dccf790cb9bd8010b1 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -41,6 +41,17 @@ spec: - name: mgcache-persistent-storage persistentVolumeClaim: claimName: mgcache + initContainers: + - name: init-chmod + image: busybox:latest + command: ['sh', "-c", "chown -R 0:101 /logs /cache && chmod -R g+w /logs /cache"] + volumeMounts: + - name: mglogs-persistent-storage + mountPath: /logs + readOnly: false + - name: mgcache-persistent-storage + mountPath: /cache + readOnly: false containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"