diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index b1e12a6..478ac11 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -58,6 +58,13 @@ Selector labels - name: {{ $key }} value: {{ $value | quote}} {{ end }} +{{- range $key, $value := .Values.extraEnvSecrets }} +- name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $value.name | quote }} + key: {{ $value.key | quote }} +{{ end }} - name: "N8N_PORT" #! we better set the port once again as ENV Var, see: https://community.n8n.io/t/default-config-is-not-set-or-the-port-to-be-more-precise/3158/3?u=vad1mo value: {{ get .Values.config "port" | default "5678" | quote }} - name: "N8N_ENCRYPTION_KEY" diff --git a/values.yaml b/values.yaml index 4976494..d1538b1 100644 --- a/values.yaml +++ b/values.yaml @@ -101,6 +101,16 @@ extraEnv: {} # Set this if running behind a reverse proxy and the external port is different from the port n8n runs on # WEBHOOK_TUNNEL_URL: "https://n8n.myhost.com/ +# Set additional environment from existing secrets +extraEnvSecrets: {} +# for example, to reuse existing postgres authentication secrets: +# DB_POSTGRESDB_USER: +# name: postgres-user-auth +# key: username +# DB_POSTGRESDB_PASSWORD: +# name: postgres-user-auth +# key: password + ## ## ##