8gears / n8n-helm-chart

A Kubernetes Helm chart for n8n a Workflow Automation Tool. Easily automate tasks across different services.
https://artifacthub.io/packages/helm/open-8gears/n8n
Apache License 2.0
207 stars 102 forks source link

cannot run with read only root filesystem because /home/node/.cache directory cannot be created #65

Open brokenjacobs opened 10 months ago

brokenjacobs commented 10 months ago

When using read only root filesystem in the securityContext:

Error: ENOENT: no such file or directory, mkdir '/home/node/.cache'
2024-01-16T17:47:37.516Z | error    | Error: Exiting due to an error. "{ file: 'LoggerProxy.js', function: 'exports.error' }"
2024-01-16T17:47:37.517Z | error    | Error: ENOENT: no such file or directory, mkdir '/home/node/.cache' "{ file: 'LoggerProxy.js', function: 'exports.error' }"

And there is no extraVolumes/extraVolumeMounts in the values to propagate an emptyDir volume to this path to mitigate the issue.

Vad1mo commented 10 months ago

Happy to accept and review PRs

brokenjacobs commented 10 months ago

I've reproduced this issue with Docker: docker run -v .../n8n:/home/node/.n8n --read-only --platform linux/amd64 -it n8nio/n8n:1.22.3

Fails with this error. docker run -v .../cache:/home/node/.cache -v .../n8n:/home/node/.n8n --read-only --platform linux/amd64 -it n8nio/n8n:1.22.3

Does not.

Interestingly enough the worker pods don't have this issue even though they are running read only.