Skip to content

Commit

Permalink
feat: add envfrom into deployments to enable loading entire secrets o…
Browse files Browse the repository at this point in the history
…r configMaps into container ENV_VARs

Signed-off-by: Marcel Dias <marcel@pltf.dev>
  • Loading branch information
marcel-dias committed Jul 16, 2024
1 parent d10683b commit c22f1b1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
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

0 comments on commit c22f1b1

Please sign in to comment.