diff --git a/charts/node-red/templates/statefulset-node-red.yaml b/charts/node-red/templates/statefulset-node-red.yaml index 0df90db..b03547a 100644 --- a/charts/node-red/templates/statefulset-node-red.yaml +++ b/charts/node-red/templates/statefulset-node-red.yaml @@ -35,6 +35,18 @@ spec: - mountPath: /data/settings.js name: configmap-node-red subPath: settings.js + initContainers: + - command: + - chown + - -R + - 1000:1000 + - /data + name: chown-data + image: alpine + volumeMounts: + - mountPath: /data + name: data + subPath: node-red-data volumes: - configMap: name: {{ include "nodeRed.fullname" . }}-node-red