From b59564b7b33caeca631abb2bd099b23ceaa52159 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Wed, 21 Sep 2022 01:24:36 +0300 Subject: [PATCH] fix(n8n): parse as int when comparing with 0 (#3824) * fix(n8n): parse as int when comparing with 0 * hmm --- charts/stable/n8n/Chart.yaml | 2 +- charts/stable/n8n/templates/_configmap.tpl | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/charts/stable/n8n/Chart.yaml b/charts/stable/n8n/Chart.yaml index 1fcf030a000..53863809cfd 100644 --- a/charts/stable/n8n/Chart.yaml +++ b/charts/stable/n8n/Chart.yaml @@ -29,7 +29,7 @@ sources: - https://docs.n8n.io/ - https://github.com/n8n-io/n8n - https://hub.docker.com/r/n8nio/n8n -version: 4.0.56 +version: 4.0.57 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/n8n/templates/_configmap.tpl b/charts/stable/n8n/templates/_configmap.tpl index 808636c04c5..833c38cd19f 100644 --- a/charts/stable/n8n/templates/_configmap.tpl +++ b/charts/stable/n8n/templates/_configmap.tpl @@ -20,9 +20,11 @@ data: {{- if .Values.usermanagement.N8N_SMTP_HOST }} N8N_SMTP_HOST: {{ .Values.usermanagement.N8N_SMTP_HOST | quote }} {{- end }} - {{- if or .Values.usermanagement.N8N_SMTP_PORT ( eq 0 .Values.usermanagement.N8N_SMTP_PORT) }} + {{- if hasKey .Values.usermanagement "N8N_SMTP_PORT" }} + {{- if or .Values.usermanagement.N8N_SMTP_PORT (eq 0 (int .Values.usermanagement.N8N_SMTP_PORT)) }} N8N_SMTP_PORT: {{ .Values.usermanagement.N8N_SMTP_PORT | quote }} {{- end }} + {{- end }} {{- if .Values.usermanagement.N8N_SMTP_USER }} N8N_SMTP_USER: {{ .Values.usermanagement.N8N_SMTP_USER | quote }} {{- end }} @@ -121,12 +123,16 @@ data: {{- if .Values.executions.EXECUTIONS_MODE }} EXECUTIONS_MODE: {{ .Values.executions.EXECUTIONS_MODE | quote }} {{- end }} - {{- if or .Values.executions.EXECUTIONS_TIMEOUT ( eq 0 .Values.executions.EXECUTIONS_TIMEOUT ) }} + {{- if hasKey .Values.executions "EXECUTIONS_TIMEOUT" }} + {{- if or .Values.executions.EXECUTIONS_TIMEOUT (eq 0 (int .Values.executions.EXECUTIONS_TIMEOUT)) }} EXECUTIONS_TIMEOUT: {{ .Values.executions.EXECUTIONS_TIMEOUT | quote }} {{- end }} - {{- if or .Values.executions.EXECUTIONS_TIMEOUT_MAX ( eq 0 .Values.executions.EXECUTIONS_TIMEOUT_MAX ) }} + {{- end }} + {{- if hasKey .Values.executions "EXECUTIONS_TIMEOUT" }} + {{- if or .Values.executions.EXECUTIONS_TIMEOUT_MAX (eq 0 (int .Values.executions.EXECUTIONS_TIMEOUT_MAX)) }} EXECUTIONS_TIMEOUT_MAX: {{ .Values.executions.EXECUTIONS_TIMEOUT_MAX | quote }} {{- end }} + {{- end }} {{- if .Values.executions.EXECUTIONS_DATA_SAVE_ON_ERROR }} EXECUTIONS_DATA_SAVE_ON_ERROR: {{ .Values.executions.EXECUTIONS_DATA_SAVE_ON_ERROR | quote }} {{- end }} @@ -142,12 +148,16 @@ data: {{- if .Values.executions.EXECUTIONS_DATA_PRUNE }} EXECUTIONS_DATA_PRUNE: {{ .Values.executions.EXECUTIONS_DATA_PRUNE | quote }} {{- end }} - {{- if or .Values.executions.EXECUTIONS_DATA_MAX_AGE ( eq 0 .Values.executions.EXECUTIONS_DATA_MAX_AGE ) }} + {{- if hasKey .Values.executions "EXECUTIONS_TIMEOUT" }} + {{- if or .Values.executions.EXECUTIONS_DATA_MAX_AGE (eq 0 (int .Values.executions.EXECUTIONS_DATA_MAX_AGE)) }} EXECUTIONS_DATA_MAX_AGE: {{ .Values.executions.EXECUTIONS_DATA_MAX_AGE | quote }} {{- end }} - {{- if or .Values.executions.EXECUTIONS_DATA_PRUNE_TIMEOUT ( eq 0 .Values.executions.EXECUTIONS_DATA_PRUNE_TIMEOUT ) }} + {{- end }} + {{- if hasKey .Values.executions "EXECUTIONS_TIMEOUT" }} + {{- if or .Values.executions.EXECUTIONS_DATA_PRUNE_TIMEOUT ( eq 0 (int .Values.executions.EXECUTIONS_DATA_PRUNE_TIMEOUT)) }} EXECUTIONS_DATA_PRUNE_TIMEOUT: {{ .Values.executions.EXECUTIONS_DATA_PRUNE_TIMEOUT | quote }} {{- end }} + {{- end }} {{/* Endpoints */}} {{- if .Values.endpoints.WEBHOOK_URL }} WEBHOOK_URL: {{ .Values.endpoints.WEBHOOK_URL | quote }}