From 7d511923cedfa7e6a888a2cd49929cf3c02e5e4f Mon Sep 17 00:00:00 2001 From: Erwin Steffens Date: Mon, 18 Dec 2023 13:37:37 +0100 Subject: [PATCH] Fix error when enabling certificate (#302) Signed-off-by: Erwin Steffens --- charts/node-red/Chart.yaml | 2 +- charts/node-red/templates/certificates.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/node-red/Chart.yaml b/charts/node-red/Chart.yaml index a381d6f3..53c23cd8 100644 --- a/charts/node-red/Chart.yaml +++ b/charts/node-red/Chart.yaml @@ -9,7 +9,7 @@ icon: https://nodered.org/about/resources/media/node-red-icon-2.png type: application -version: 0.28.1 +version: 0.28.2 appVersion: 3.0.2 keywords: diff --git a/charts/node-red/templates/certificates.yaml b/charts/node-red/templates/certificates.yaml index 45202567..17370d5c 100644 --- a/charts/node-red/templates/certificates.yaml +++ b/charts/node-red/templates/certificates.yaml @@ -1,11 +1,12 @@ {{$name := include "node-red.certificateName" . }} +{{$namespace := .Release.Namespace }} {{- range $index, $value := .Values.ingress.tls }} {{- if $value.certificate.enabled }} apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: {{ $value.certificate.name | default (printf "%s-%d" $name $index) | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ $namespace | quote }} spec: commonName: {{ index $value.hosts 0 }} dnsNames: