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
187 stars 97 forks source link

Conditionally add `N8N_ENCRYPTION_KEY` environment variable #34

Closed bamsammich closed 1 year ago

bamsammich commented 1 year ago

Playing around with trying n8n, so I ran into a case where my minimally-defined configuration required no secret config since I'm using extraSecretEnv to set the database password. That means that the secret isn't getting created, and trying to set N8N_ENCRYPTION_KEY from a nonexistent Secret will fail the installation. (FWIW, I didn't configure n8n.encryption_key either)

This will conditionally set the environment variable if .Values.n8n.encryption_key is defined (which should also generate the secret).