Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add envfrom into deployments to enable loading entire secrets or configMaps into container ENV_VARs #109

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ 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 variables on the Deployment from k8s secrets
envFrom: []
# List of existing secrets to add to deployments
# Example using envFrom with AWS SSM ParameterStore via ExternalSecrets:
# envFrom:
# - secretRef:
# name: secret-name

replicaCount: 1

image:
Expand Down
4 changes: 4 additions & 0 deletions charts/n8n/templates/deployment.webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ spec:
args: ["webhook"]
env:
{{- include "n8n.deploymentPodEnvironments" . | nindent 12 }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ get .Values.config "port" | default 5678 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/n8n/templates/deployment.worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ spec:
args: ["worker", "--concurrency={{ .Values.scaling.worker.concurrency }}"]
env:
{{- include "n8n.deploymentPodEnvironments" . | nindent 12 }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ get .Values.config "port" | default 5678 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/n8n/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- include "n8n.deploymentPodEnvironments" . | nindent 12 }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 12 }}
ports:
Expand Down
4 changes: 4 additions & 0 deletions charts/n8n/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ extraEnvSecrets: {}
# name: postgres-user-auth
# key: password

envFrom: []
# - secretRef:
# name: secret-name

## Common Kubernetes Config Settings
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
Expand Down