From 46d537000a9df285c17144597082ba7c51d619cc Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Wed, 27 May 2026 08:57:00 +0300 Subject: [PATCH] Try another env in n8n --- charts/n8n/templates/deployment.yaml | 12 ++++++++++++ charts/n8n/templates/service.yaml | 6 ++++++ charts/n8n/values.yaml | 21 +++++++++++++++++++++ manifests/n8n/values.yaml | 13 +++++++++++++ 4 files changed, 52 insertions(+) diff --git a/charts/n8n/templates/deployment.yaml b/charts/n8n/templates/deployment.yaml index 2b174fd..fe767e9 100644 --- a/charts/n8n/templates/deployment.yaml +++ b/charts/n8n/templates/deployment.yaml @@ -28,6 +28,11 @@ spec: - name: http containerPort: 5678 protocol: TCP + {{- if .Values.runners.enabled }} + - name: broker + containerPort: {{ .Values.service.brokerPort | default 5679 }} + protocol: TCP + {{- end }} env: # N8N configuration from values - name: N8N_HOST @@ -76,6 +81,13 @@ spec: secretKeyRef: name: n8n-secrets key: TELEGRAM_BOT_TOKEN + {{- if .Values.runners.enabled }} + - name: N8N_RUNNERS_AUTH_TOKEN + valueFrom: + secretKeyRef: + name: {{ .Values.runners.authSecretName }} + key: {{ .Values.runners.authSecretKey }} + {{- end }} {{- if .Values.env }} {{- range $key, $value := .Values.env }} - name: {{ $key }} diff --git a/charts/n8n/templates/service.yaml b/charts/n8n/templates/service.yaml index 5ad32e9..12ee693 100644 --- a/charts/n8n/templates/service.yaml +++ b/charts/n8n/templates/service.yaml @@ -11,5 +11,11 @@ spec: targetPort: http protocol: TCP name: http + {{- if .Values.runners.enabled }} + - port: {{ .Values.service.brokerPort | default 5679 }} + targetPort: broker + protocol: TCP + name: broker + {{- end }} selector: {{- include "n8n.selectorLabels" . | nindent 4 }} diff --git a/charts/n8n/values.yaml b/charts/n8n/values.yaml index 2db2e1a..abc89ef 100644 --- a/charts/n8n/values.yaml +++ b/charts/n8n/values.yaml @@ -12,6 +12,7 @@ fullnameOverride: "" service: type: ClusterIP port: 80 + brokerPort: 5679 ingress: enabled: true @@ -68,3 +69,23 @@ resources: nodeSelector: {} # workload: general + +runners: + enabled: false + replicaCount: 1 + image: + repository: n8nio/runners + tag: latest + pullPolicy: IfNotPresent + # Secret containing N8N_RUNNERS_AUTH_TOKEN key + authSecretName: n8n-secrets + authSecretKey: N8N_ENCRYPTION_KEY + # Secret containing TELEGRAM_BOT_TOKEN key for expression env access + envSecretName: n8n-secrets + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi diff --git a/manifests/n8n/values.yaml b/manifests/n8n/values.yaml index 4f43f9f..0f57bf5 100644 --- a/manifests/n8n/values.yaml +++ b/manifests/n8n/values.yaml @@ -46,6 +46,19 @@ resources: env: N8N_BLOCK_ENV_ACCESS_IN_NODE: "false" + N8N_RUNNERS_ENABLED: "true" + N8N_RUNNERS_MODE: external + N8N_RUNNERS_BROKER_LISTEN_ADDRESS: 0.0.0.0 + +runners: + enabled: true + image: + repository: n8nio/runners + tag: latest + pullPolicy: IfNotPresent + authSecretName: n8n-secrets + authSecretKey: N8N_ENCRYPTION_KEY + envSecretName: n8n-secrets # Sensitive environment variables are injected from the n8n-secrets Secret # Expected keys in n8n-secrets: