diff --git a/README.md b/README.md index cdd51e5..14c0b18 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,13 @@ main: # postgresdb: # password: 'big secret' + # A list of environment variables to import from configMapRef or secretRef. + extraEnvFrom: [] + # - configMapRef: + # name: n8n-config + # - secretRef: + # name: n8n-config + # Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars. extraEnv: # N8N_DB_POSTGRESDB_NAME: @@ -368,6 +375,9 @@ worker: # additional (to main) config for worker secret: {} + # A list of environment variables to import from configMapRef or secretRef. + extraEnvFrom: [] + # Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars. extraEnv: {} @@ -551,6 +561,9 @@ webhook: # additional (to main) config for webhook secret: {} + # A list of environment variables to import from configMapRef or secretRef. + extraEnvFrom: [] + # Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars. extraEnv: {} # WEBHOOK_URL: diff --git a/charts/n8n/Chart.yaml b/charts/n8n/Chart.yaml index 3d83537..a2395ab 100644 --- a/charts/n8n/Chart.yaml +++ b/charts/n8n/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: n8n -version: 1.0.12 +version: 1.1.0 appVersion: 1.107.4 type: application 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." @@ -34,7 +34,5 @@ annotations: artifacthub.io/prerelease: "false" # supported kinds are added, changed, deprecated, removed, fixed and security. artifacthub.io/changes: | - - kind: fixed - description: "allows empty tls for ingres: fixes https://github.com/8gears/n8n-helm-chart/issues/167" - - kind: changed - description: "Bump appVersion to n8n 1.107.4." + - kind: added + description: "support extraEnvFrom in values file" diff --git a/charts/n8n/templates/deployment.webhook.yaml b/charts/n8n/templates/deployment.webhook.yaml index 5dc22fc..45a08cf 100644 --- a/charts/n8n/templates/deployment.webhook.yaml +++ b/charts/n8n/templates/deployment.webhook.yaml @@ -88,7 +88,7 @@ spec: - configMapRef: name: {{ include "n8n.fullname" . }}-app-config {{- end }} - {{- if .Values.main.secret }} + {{- if .Values.main.secret }} - secretRef: name: {{ include "n8n.fullname" . }}-app-secret {{- end }} @@ -96,11 +96,13 @@ spec: - configMapRef: name: {{ include "n8n.fullname" . }}-webhook-config {{- end }} - {{- if .Values.webhook.secret }} + {{- if .Values.webhook.secret }} - secretRef: name: {{ include "n8n.fullname" . }}-webhook-secret {{- end }} - + {{- if .Values.webhook.extraEnvFrom }} + {{- toYaml .Values.webhook.extraEnvFrom | nindent 12 }} + {{- end }} env: {{ not (empty .Values.webhook.extraEnv) | ternary nil "[]" }} {{- range $key, $value := .Values.webhook.extraEnv }} - name: {{ $key }} diff --git a/charts/n8n/templates/deployment.worker.yaml b/charts/n8n/templates/deployment.worker.yaml index 13d7a8d..4692003 100644 --- a/charts/n8n/templates/deployment.worker.yaml +++ b/charts/n8n/templates/deployment.worker.yaml @@ -63,7 +63,7 @@ spec: - configMapRef: name: {{ include "n8n.fullname" . }}-app-config {{- end }} - {{- if .Values.main.secret }} + {{- if .Values.main.secret }} - secretRef: name: {{ include "n8n.fullname" . }}-app-secret {{- end }} @@ -71,10 +71,13 @@ spec: - configMapRef: name: {{ include "n8n.fullname" . }}-worker-config {{- end }} - {{- if .Values.worker.secret }} + {{- if .Values.worker.secret }} - secretRef: name: {{ include "n8n.fullname" . }}-worker-secret {{- end }} + {{- if .Values.worker.extraEnvFrom }} + {{- toYaml .Values.worker.extraEnvFrom | nindent 12 }} + {{- end }} env: {{ not (empty .Values.worker.extraEnv) | ternary nil "[]" }} {{- range $key, $value := .Values.worker.extraEnv }} - name: {{ $key }} diff --git a/charts/n8n/templates/deployment.yaml b/charts/n8n/templates/deployment.yaml index 523df2b..a5f798a 100644 --- a/charts/n8n/templates/deployment.yaml +++ b/charts/n8n/templates/deployment.yaml @@ -72,6 +72,9 @@ spec: - secretRef: name: {{ include "n8n.fullname" . }}-app-secret {{- end }} + {{- if .Values.main.extraEnvFrom }} + {{- toYaml .Values.main.extraEnvFrom | nindent 12 }} + {{- end }} env: {{ not (empty .Values.main.extraEnv) | ternary nil "[]" }} {{- range $key, $value := .Values.main.extraEnv }} - name: {{ $key }} diff --git a/charts/n8n/templates/service.yaml b/charts/n8n/templates/service.yaml index 3272770..e2c93cd 100644 --- a/charts/n8n/templates/service.yaml +++ b/charts/n8n/templates/service.yaml @@ -1,4 +1,3 @@ -{{ if .Values.main.service.enabled -}} apiVersion: v1 kind: Service metadata: @@ -19,4 +18,3 @@ spec: selector: {{- include "n8n.selectorLabels" . | nindent 4 }} app.kubernetes.io/type: master -{{ end }} diff --git a/charts/n8n/values.yaml b/charts/n8n/values.yaml index 7c1b25a..bc8e924 100644 --- a/charts/n8n/values.yaml +++ b/charts/n8n/values.yaml @@ -73,6 +73,13 @@ main: # postgresdb: # password: 'big secret' + # A list of environment variables to import from configMapRef or secretRef. + extraEnvFrom: [] + # - configMapRef: + # name: n8n-config + # - secretRef: + # name: n8n-config + # Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars. extraEnv: # N8N_DB_POSTGRESDB_NAME: @@ -235,7 +242,6 @@ main: service: - enabled: true annotations: {} # -- Service types allow you to specify what kind of Service you want. # E.g., ClusterIP, NodePort, LoadBalancer, ExternalName @@ -279,6 +285,9 @@ worker: # additional (to main) config for worker secret: {} + # A list of environment variables to import from configMapRef or secretRef. + extraEnvFrom: [] + # Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars. extraEnv: {} @@ -462,6 +471,9 @@ webhook: # additional (to main) config for webhook secret: {} + # A list of environment variables to import from configMapRef or secretRef. + extraEnvFrom: [] + # Extra environmental variables, so you can reference other configmaps and secrets into n8n as env vars. extraEnv: {} # WEBHOOK_URL: