WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit b32f423

Browse files
committed
feat: support envFrom in values file
1 parent 55f6752 commit b32f423

File tree

7 files changed

+41
-9
lines changed

7 files changed

+41
-9
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ main:
167167
# postgresdb:
168168
# password: 'big secret'
169169
170+
# A list of environment variables to import from configMapRef or secretRef.
171+
extraEnvFrom: []
172+
# - configMapRef:
173+
# name: n8n-config
174+
# - secretRef:
175+
# name: n8n-config
176+
170177
# Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars.
171178
extraEnv:
172179
# N8N_DB_POSTGRESDB_NAME:
@@ -372,6 +379,9 @@ worker:
372379
# additional (to main) config for worker
373380
secret: {}
374381

382+
# A list of environment variables to import from configMapRef or secretRef.
383+
extraEnvFrom: []
384+
375385
# Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars.
376386
extraEnv: {}
377387

@@ -555,6 +565,9 @@ webhook:
555565
# additional (to main) config for webhook
556566
secret: {}
557567

568+
# A list of environment variables to import from configMapRef or secretRef.
569+
extraEnvFrom: []
570+
558571
# Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars.
559572
extraEnv: {}
560573
# WEBHOOK_URL:

charts/n8n/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: n8n
3-
version: 1.0.7
3+
version: 1.1.0
44
appVersion: 1.85.1
55
type: application
66
description: "Helm Chart for deploying n8n on Kubernetes, a fair-code workflow automation platform with native AI capabilities for technical teams. Easily automate tasks across different services."
@@ -36,3 +36,4 @@ annotations:
3636
artifacthub.io/changes: |
3737
- kind: fixed
3838
description: "fix https://github.com/8gears/n8n-helm-chart/issues/176"
39+

charts/n8n/templates/deployment.webhook.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,21 @@ spec:
8888
- configMapRef:
8989
name: {{ include "n8n.fullname" . }}-app-config
9090
{{- end }}
91-
{{- if .Values.main.secret }}
91+
{{- if .Values.main.secret }}
9292
- secretRef:
9393
name: {{ include "n8n.fullname" . }}-app-secret
9494
{{- end }}
9595
{{- if .Values.webhook.config }}
9696
- configMapRef:
9797
name: {{ include "n8n.fullname" . }}-webhook-config
9898
{{- end }}
99-
{{- if .Values.webhook.secret }}
99+
{{- if .Values.webhook.secret }}
100100
- secretRef:
101101
name: {{ include "n8n.fullname" . }}-webhook-secret
102102
{{- end }}
103-
103+
{{- if .Values.webhook.extraEnvFrom }}
104+
{{- toYaml .Values.webhook.extraEnvFrom | nindent 12 }}
105+
{{- end }}
104106
env: {{ not (empty .Values.webhook.extraEnv) | ternary nil "[]" }}
105107
{{- range $key, $value := .Values.webhook.extraEnv }}
106108
- name: {{ $key }}

charts/n8n/templates/deployment.worker.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,21 @@ spec:
6363
- configMapRef:
6464
name: {{ include "n8n.fullname" . }}-app-config
6565
{{- end }}
66-
{{- if .Values.main.secret }}
66+
{{- if .Values.main.secret }}
6767
- secretRef:
6868
name: {{ include "n8n.fullname" . }}-app-secret
6969
{{- end }}
7070
{{- if .Values.worker.config }}
7171
- configMapRef:
7272
name: {{ include "n8n.fullname" . }}-worker-config
7373
{{- end }}
74-
{{- if .Values.worker.secret }}
74+
{{- if .Values.worker.secret }}
7575
- secretRef:
7676
name: {{ include "n8n.fullname" . }}-worker-secret
7777
{{- end }}
78+
{{- if .Values.worker.extraEnvFrom }}
79+
{{- toYaml .Values.worker.extraEnvFrom | nindent 12 }}
80+
{{- end }}
7881
env: {{ not (empty .Values.worker.extraEnv) | ternary nil "[]" }}
7982
{{- range $key, $value := .Values.worker.extraEnv }}
8083
- name: {{ $key }}

charts/n8n/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ spec:
7272
- secretRef:
7373
name: {{ include "n8n.fullname" . }}-app-secret
7474
{{- end }}
75+
{{- if .Values.main.extraEnvFrom }}
76+
{{- toYaml .Values.main.extraEnvFrom | nindent 12 }}
77+
{{- end }}
7578
env: {{ not (empty .Values.main.extraEnv) | ternary nil "[]" }}
7679
{{- range $key, $value := .Values.main.extraEnv }}
7780
- name: {{ $key }}

charts/n8n/templates/service.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{ if .Values.main.service.enabled -}}
21
apiVersion: v1
32
kind: Service
43
metadata:
@@ -19,4 +18,3 @@ spec:
1918
selector:
2019
{{- include "n8n.selectorLabels" . | nindent 4 }}
2120
app.kubernetes.io/type: master
22-
{{ end }}

charts/n8n/values.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ main:
6868
# postgresdb:
6969
# password: 'big secret'
7070

71+
# A list of environment variables to import from configMapRef or secretRef.
72+
extraEnvFrom: []
73+
# - configMapRef:
74+
# name: n8n-config
75+
# - secretRef:
76+
# name: n8n-config
77+
7178
# Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars.
7279
extraEnv:
7380
# N8N_DB_POSTGRESDB_NAME:
@@ -230,7 +237,6 @@ main:
230237

231238

232239
service:
233-
enabled: true
234240
annotations: {}
235241
# -- Service types allow you to specify what kind of Service you want.
236242
# E.g., ClusterIP, NodePort, LoadBalancer, ExternalName
@@ -274,6 +280,9 @@ worker:
274280
# additional (to main) config for worker
275281
secret: {}
276282

283+
# A list of environment variables to import from configMapRef or secretRef.
284+
extraEnvFrom: []
285+
277286
# Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars.
278287
extraEnv: {}
279288

@@ -457,6 +466,9 @@ webhook:
457466
# additional (to main) config for webhook
458467
secret: {}
459468

469+
# A list of environment variables to import from configMapRef or secretRef.
470+
extraEnvFrom: []
471+
460472
# Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars.
461473
extraEnv: {}
462474
# WEBHOOK_URL:

0 commit comments

Comments
 (0)