Skip to content

Commit

Permalink
allow using existing secrets for environment variables (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
abaus-vc authored Mar 21, 2023
1 parent 2030bcf commit 6227656
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 10 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

##
##
##
Expand Down

0 comments on commit 6227656

Please sign in to comment.