From 87b2a833ccd51f6dba85a21d71b32f0a5446e98a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 2 May 2026 18:24:10 +0900 Subject: [PATCH] fix: auto-detect N8N_SECURE_COOKIE from Ingress/TLS settings Set N8N_SECURE_COOKIE=true only when ingress.enabled=true AND ingress.tls is configured. All other cases (LoadBalancer, HTTP Ingress) default to false, eliminating the secure cookie error without manual configuration. Co-Authored-By: Claude Sonnet 4.6 --- Chart.yaml | 2 +- README.md | 11 +++++++++++ templates/deployment.yaml | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index ff29832..4010233 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: n8n description: A Helm chart for n8n workflow automation on Kubernetes (ARM/Raspberry Pi ready) type: application -version: "2.19.2" +version: "2.19.2-a" appVersion: "2.19.2" keywords: - n8n diff --git a/README.md b/README.md index 11b222d..57ef7b1 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,16 @@ helm install my-n8n cafepieters/n8n \ | `resources.limits.cpu` | `1000m` | | `resources.limits.memory` | `512Mi` | +## セキュアCookieの自動設定 + +`N8N_SECURE_COOKIE` は Ingress の設定に基づいて自動的に決定されます。手動設定は不要です。 + +| 条件 | `N8N_SECURE_COOKIE` | +|---|---| +| `ingress.enabled: false`(LoadBalancer / HTTP直接アクセス) | `false` | +| `ingress.enabled: true` かつ `ingress.tls` 未設定 | `false` | +| `ingress.enabled: true` かつ `ingress.tls` 設定済み | `true` | + ## データ永続化について n8n のデータ(ワークフロー定義・認証情報・実行履歴・SQLite DB)は `/home/node/.n8n` に保存されます。 @@ -181,6 +191,7 @@ n8n: | バージョン | n8n | 変更内容 | |---|---|---| | 2.19.2 | 2.19.2 | 初回リリース | +| 2.19.2-a | 2.19.2 | `N8N_SECURE_COOKIE` を Ingress/TLS 設定から自動判定(HTTP/LoadBalancer 環境対応) | ## ライセンス diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 3b86575..dad32b3 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -73,6 +73,12 @@ spec: name: {{ .Values.n8n.basicAuth.existingSecret | default (include "n8n.fullname" .) }} key: {{ .Values.n8n.basicAuth.passwordKey }} {{- end }} + - name: N8N_SECURE_COOKIE + {{- if and .Values.ingress.enabled .Values.ingress.tls }} + value: "true" + {{- else }} + value: "false" + {{- end }} - name: EXECUTIONS_DATA_PRUNE value: {{ .Values.n8n.executions.pruneData | quote }} - name: EXECUTIONS_DATA_MAX_AGE