From c9e7d0ae2350a5b062d68743a298dc8626f8d4ed Mon Sep 17 00:00:00 2001 From: jschaul Date: Wed, 18 Jan 2023 13:34:00 +0100 Subject: [PATCH 1/5] ingress compatibility k8s 1.22 and beyond See https://kubernetes.io/docs/reference/using-api/deprecation-guide/ --- .../0-release-notes/chart-compatibility | 1 + charts/inbucket/templates/_helpers.tpl | 26 ++++++++ charts/inbucket/templates/ingress.yaml | 14 +++- charts/legalhold/templates/_helpers.tpl | 26 ++++++++ charts/legalhold/templates/ingress.yaml | 14 +++- .../templates/_helpers.tpl | 27 ++++++++ .../templates/ingress.yaml | 64 ++++++++++++++++++- .../templates/ingress_federator.yaml | 11 +++- charts/sftd/templates/_helpers.tpl | 27 ++++++++ charts/sftd/templates/ingress.yaml | 34 +++++++++- 10 files changed, 239 insertions(+), 5 deletions(-) create mode 100644 changelog.d/0-release-notes/chart-compatibility create mode 100644 charts/inbucket/templates/_helpers.tpl create mode 100644 charts/legalhold/templates/_helpers.tpl diff --git a/changelog.d/0-release-notes/chart-compatibility b/changelog.d/0-release-notes/chart-compatibility new file mode 100644 index 00000000000..0edbcf0b69c --- /dev/null +++ b/changelog.d/0-release-notes/chart-compatibility @@ -0,0 +1 @@ +wire-server helm charts using Ingress resources are now compatible with kubernetes versions 1.22, 1.23 and 1.24. diff --git a/charts/inbucket/templates/_helpers.tpl b/charts/inbucket/templates/_helpers.tpl new file mode 100644 index 00000000000..d011faaeb00 --- /dev/null +++ b/charts/inbucket/templates/_helpers.tpl @@ -0,0 +1,26 @@ +{{/* Allow KubeVersion to be overridden. */}} +{{- define "kubeVersion" -}} + {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +{{- end - + +{{/* Get Ingress API Version */}} +{{- define "ingress.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kubeVersion" .)) -}} + {{- print "networking.k8s.io/v1" -}} + {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "extensions/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* Check Ingress stability */}} +{{- define "ingress.isStable" -}} + {{- eq (include "ingress.apiVersion" .) "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* Check Ingress supports pathType */}} +{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} +{{- define "ingress.supportsPathType" -}} + {{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kubeVersion" .))) -}} +{{- end -}} diff --git a/charts/inbucket/templates/ingress.yaml b/charts/inbucket/templates/ingress.yaml index 7be2a320c28..c2803b4e005 100644 --- a/charts/inbucket/templates/ingress.yaml +++ b/charts/inbucket/templates/ingress.yaml @@ -1,4 +1,6 @@ -apiVersion: extensions/v1beta1 +{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "ingress.apiVersion" . }} kind: Ingress metadata: name: "inbucket" @@ -14,6 +16,16 @@ spec: http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: {{ include "inbucket.fullname" . }} + port: + name: http + {{- else }} serviceName: {{ include "inbucket.fullname" . }} servicePort: http + {{- end }} diff --git a/charts/legalhold/templates/_helpers.tpl b/charts/legalhold/templates/_helpers.tpl new file mode 100644 index 00000000000..d011faaeb00 --- /dev/null +++ b/charts/legalhold/templates/_helpers.tpl @@ -0,0 +1,26 @@ +{{/* Allow KubeVersion to be overridden. */}} +{{- define "kubeVersion" -}} + {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +{{- end - + +{{/* Get Ingress API Version */}} +{{- define "ingress.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kubeVersion" .)) -}} + {{- print "networking.k8s.io/v1" -}} + {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "extensions/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* Check Ingress stability */}} +{{- define "ingress.isStable" -}} + {{- eq (include "ingress.apiVersion" .) "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* Check Ingress supports pathType */}} +{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} +{{- define "ingress.supportsPathType" -}} + {{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kubeVersion" .))) -}} +{{- end -}} diff --git a/charts/legalhold/templates/ingress.yaml b/charts/legalhold/templates/ingress.yaml index c6ae51758e7..24cfcd98135 100644 --- a/charts/legalhold/templates/ingress.yaml +++ b/charts/legalhold/templates/ingress.yaml @@ -1,4 +1,6 @@ -apiVersion: extensions/v1beta1 +{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "ingress.apiVersion" . }} kind: Ingress metadata: name: hold @@ -16,6 +18,16 @@ spec: http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: "{{ .Release.Name }}-hold" + port: + number: 8080 + {{- else }} serviceName: "{{ .Release.Name }}-hold" servicePort: 8080 + {{- end }} diff --git a/charts/nginx-ingress-services/templates/_helpers.tpl b/charts/nginx-ingress-services/templates/_helpers.tpl index e6480a58344..47436b1b1f6 100644 --- a/charts/nginx-ingress-services/templates/_helpers.tpl +++ b/charts/nginx-ingress-services/templates/_helpers.tpl @@ -59,3 +59,30 @@ Returns the Letsencrypt API server URL based on whether testMode is enabled or d {{- $hostnameParts = append $hostnameParts "v02" -}} {{- join "-" $hostnameParts | printf "https://%s.api.letsencrypt.org/directory" -}} {{- end -}} + +{{/* Allow KubeVersion to be overridden. */}} +{{- define "kubeVersion" -}} + {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +{{- end - + +{{/* Get Ingress API Version */}} +{{- define "ingress.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kubeVersion" .)) -}} + {{- print "networking.k8s.io/v1" -}} + {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "extensions/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* Check Ingress stability */}} +{{- define "ingress.isStable" -}} + {{- eq (include "ingress.apiVersion" .) "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* Check Ingress supports pathType */}} +{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} +{{- define "ingress.supportsPathType" -}} + {{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kubeVersion" .))) -}} +{{- end -}} diff --git a/charts/nginx-ingress-services/templates/ingress.yaml b/charts/nginx-ingress-services/templates/ingress.yaml index 6cc9d019e42..0314ee95136 100644 --- a/charts/nginx-ingress-services/templates/ingress.yaml +++ b/charts/nginx-ingress-services/templates/ingress.yaml @@ -1,4 +1,6 @@ -apiVersion: extensions/v1beta1 +{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "ingress.apiVersion" . }} kind: Ingress metadata: name: nginx-ingress @@ -31,51 +33,111 @@ spec: http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: nginz + port: + name: http + {{- else }} serviceName: nginz servicePort: http + {{- end }} {{- if .Values.websockets.enabled }} - host: {{ .Values.config.dns.ssl }} http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: nginz + port: + name: ws + {{- else }} serviceName: nginz servicePort: ws + {{- end }} {{- end }} {{- if .Values.webapp.enabled }} - host: {{ .Values.config.dns.webapp }} http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: webapp-http + port: + number: {{ .Values.service.webapp.externalPort }} + {{- else }} serviceName: webapp-http servicePort: {{ .Values.service.webapp.externalPort }} + {{- end }} {{- end }} {{- if .Values.fakeS3.enabled }} - host: {{ .Values.config.dns.fakeS3 }} http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: {{ .Values.service.s3.serviceName }} + port: + number: {{ .Values.service.s3.externalPort }} + {{- else }} serviceName: {{ .Values.service.s3.serviceName }} servicePort: {{ .Values.service.s3.externalPort }} + {{- end }} {{- end }} {{- if .Values.teamSettings.enabled }} - host: {{ .Values.config.dns.teamSettings }} http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: team-settings-http + port: + number: {{ .Values.service.teamSettings.externalPort }} + {{- else }} serviceName: team-settings-http servicePort: {{ .Values.service.teamSettings.externalPort }} + {{- end }} {{- end }} {{- if .Values.accountPages.enabled }} - host: {{ .Values.config.dns.accountPages }} http: paths: - path: / + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: account-pages-http + port: + number: {{ .Values.service.accountPages.externalPort }} + {{- else }} serviceName: account-pages-http servicePort: {{ .Values.service.accountPages.externalPort }} + {{- end }} {{- end }} diff --git a/charts/nginx-ingress-services/templates/ingress_federator.yaml b/charts/nginx-ingress-services/templates/ingress_federator.yaml index e756d1cee24..1e0eede9e77 100644 --- a/charts/nginx-ingress-services/templates/ingress_federator.yaml +++ b/charts/nginx-ingress-services/templates/ingress_federator.yaml @@ -1,7 +1,9 @@ {{- if .Values.federator.enabled }} # We use a separate ingress for federator so that we can require client # certificates only for federation requests -apiVersion: extensions/v1beta1 +{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "ingress.apiVersion" . }} kind: Ingress metadata: name: federator-ingress @@ -24,6 +26,13 @@ spec: http: paths: - backend: + {{- if $apiIsStable }} + service: + name: federator + port: + name: federator-ext + {{- else }} serviceName: federator servicePort: federator-ext # name must be below 15 chars + {{- end }} {{- end }} diff --git a/charts/sftd/templates/_helpers.tpl b/charts/sftd/templates/_helpers.tpl index 58329804979..9f554388561 100644 --- a/charts/sftd/templates/_helpers.tpl +++ b/charts/sftd/templates/_helpers.tpl @@ -58,3 +58,30 @@ app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/name: join-call app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} + +{{/* Allow KubeVersion to be overridden. */}} +{{- define "kubeVersion" -}} + {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +{{- end - + +{{/* Get Ingress API Version */}} +{{- define "ingress.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kubeVersion" .)) -}} + {{- print "networking.k8s.io/v1" -}} + {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "extensions/v1beta1" -}} + {{- end -}} +{{- end -}} + +{{/* Check Ingress stability */}} +{{- define "ingress.isStable" -}} + {{- eq (include "ingress.apiVersion" .) "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* Check Ingress supports pathType */}} +{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} +{{- define "ingress.supportsPathType" -}} + {{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kubeVersion" .))) -}} +{{- end -}} diff --git a/charts/sftd/templates/ingress.yaml b/charts/sftd/templates/ingress.yaml index 9bf7958fa0b..780c3d5cbb6 100644 --- a/charts/sftd/templates/ingress.yaml +++ b/charts/sftd/templates/ingress.yaml @@ -1,4 +1,6 @@ -apiVersion: extensions/v1beta1 +{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} +apiVersion: {{ include "ingress.apiVersion" . }} kind: Ingress metadata: name: "{{ include "sftd.fullname" . }}" @@ -18,14 +20,44 @@ spec: http: paths: - path: /sft/ + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: {{ include "sftd.fullname" . }} + port: + name: sft + {{- else }} serviceName: "{{ include "sftd.fullname" . }}" servicePort: sft + {{- end }} - path: /sfts/ + {{- if $ingressSupportsPathType }} + pathType: Prefix + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: "{{ include "sftd.fullname" . }}-join-call" + port: + name: http + {{- else }} serviceName: "{{ include "sftd.fullname" . }}-join-call" servicePort: http + {{- end }} - path: /sft_servers_all.json + {{- if $ingressSupportsPathType }} + pathType: Exact + {{- end }} backend: + {{- if $apiIsStable }} + service: + name: "{{ include "sftd.fullname" . }}-join-call" + port: + name: http + {{- else }} serviceName: "{{ include "sftd.fullname" . }}-join-call" servicePort: http + {{- end }} From 12197f11626b8e83ec25d46a65c3dcf68890fb63 Mon Sep 17 00:00:00 2001 From: jschaul Date: Wed, 18 Jan 2023 13:44:15 +0100 Subject: [PATCH 2/5] batch api compatibility for k8s >= 1.25 --- .../elasticsearch-ephemeral/templates/_helpers.tpl | 10 ---------- charts/ldap-scim-bridge/templates/_helpers.tpl | 13 +++++++++++++ charts/ldap-scim-bridge/templates/cronjob.yaml | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 charts/ldap-scim-bridge/templates/_helpers.tpl diff --git a/charts/elasticsearch-ephemeral/templates/_helpers.tpl b/charts/elasticsearch-ephemeral/templates/_helpers.tpl index e49dfab7a65..2aa4295dc81 100644 --- a/charts/elasticsearch-ephemeral/templates/_helpers.tpl +++ b/charts/elasticsearch-ephemeral/templates/_helpers.tpl @@ -15,13 +15,3 @@ We truncate at 53 chars (63 - len("-discovery")) because some Kubernetes name fi {{- printf "%s" $name | trunc 53 | trimSuffix "-" -}} {{- end -}} -{{/* -Return the appropriate apiVersion for Curactor cron job. -*/}} -{{- define "curator.cronJob.apiVersion" -}} -{{- if ge .Capabilities.KubeVersion.Minor "8" -}} -"batch/v1beta1" -{{- else -}} -"batch/v2alpha1" -{{- end -}} -{{- end -}} diff --git a/charts/ldap-scim-bridge/templates/_helpers.tpl b/charts/ldap-scim-bridge/templates/_helpers.tpl new file mode 100644 index 00000000000..0168a7cf1ff --- /dev/null +++ b/charts/ldap-scim-bridge/templates/_helpers.tpl @@ -0,0 +1,13 @@ +{{/* Allow KubeVersion to be overridden. */}} +{{- define "kubeVersion" -}} + {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +{{- end - + +{{/* Get Batch API Version */}} +{{- define "batch.apiVersion" -}} + {{- if and (.Capabilities.APIVersions.Has "batch/v1") (semverCompare ">= 1.21-0" (include "kubeVersion" .)) -}} + {{- print "batch/v1" -}} + {{- else -}} + {{- print "batch/v1beta1" -}} + {{- end -}} +{{- end -}} diff --git a/charts/ldap-scim-bridge/templates/cronjob.yaml b/charts/ldap-scim-bridge/templates/cronjob.yaml index 365fa67eca8..3b41131f6bc 100644 --- a/charts/ldap-scim-bridge/templates/cronjob.yaml +++ b/charts/ldap-scim-bridge/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: {{ include "batch.apiVersion" . }} kind: CronJob metadata: name: {{ .Release.Name }} From 25dacb40d759fa79642e1da990d0d7b359bad203 Mon Sep 17 00:00:00 2001 From: jschaul Date: Wed, 18 Jan 2023 14:40:14 +0100 Subject: [PATCH 3/5] fixup lost closing parenthesis --- charts/inbucket/templates/_helpers.tpl | 2 +- charts/ldap-scim-bridge/templates/_helpers.tpl | 2 +- charts/legalhold/templates/_helpers.tpl | 2 +- charts/nginx-ingress-services/templates/_helpers.tpl | 2 +- charts/sftd/templates/_helpers.tpl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/inbucket/templates/_helpers.tpl b/charts/inbucket/templates/_helpers.tpl index d011faaeb00..c0e9c954982 100644 --- a/charts/inbucket/templates/_helpers.tpl +++ b/charts/inbucket/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Allow KubeVersion to be overridden. */}} {{- define "kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} -{{- end - +{{- end -}} {{/* Get Ingress API Version */}} {{- define "ingress.apiVersion" -}} diff --git a/charts/ldap-scim-bridge/templates/_helpers.tpl b/charts/ldap-scim-bridge/templates/_helpers.tpl index 0168a7cf1ff..c288d2067da 100644 --- a/charts/ldap-scim-bridge/templates/_helpers.tpl +++ b/charts/ldap-scim-bridge/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Allow KubeVersion to be overridden. */}} {{- define "kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} -{{- end - +{{- end -}} {{/* Get Batch API Version */}} {{- define "batch.apiVersion" -}} diff --git a/charts/legalhold/templates/_helpers.tpl b/charts/legalhold/templates/_helpers.tpl index d011faaeb00..c0e9c954982 100644 --- a/charts/legalhold/templates/_helpers.tpl +++ b/charts/legalhold/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Allow KubeVersion to be overridden. */}} {{- define "kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} -{{- end - +{{- end -}} {{/* Get Ingress API Version */}} {{- define "ingress.apiVersion" -}} diff --git a/charts/nginx-ingress-services/templates/_helpers.tpl b/charts/nginx-ingress-services/templates/_helpers.tpl index 47436b1b1f6..32f4467617f 100644 --- a/charts/nginx-ingress-services/templates/_helpers.tpl +++ b/charts/nginx-ingress-services/templates/_helpers.tpl @@ -63,7 +63,7 @@ Returns the Letsencrypt API server URL based on whether testMode is enabled or d {{/* Allow KubeVersion to be overridden. */}} {{- define "kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} -{{- end - +{{- end -}} {{/* Get Ingress API Version */}} {{- define "ingress.apiVersion" -}} diff --git a/charts/sftd/templates/_helpers.tpl b/charts/sftd/templates/_helpers.tpl index 9f554388561..f6e1d331138 100644 --- a/charts/sftd/templates/_helpers.tpl +++ b/charts/sftd/templates/_helpers.tpl @@ -62,7 +62,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{/* Allow KubeVersion to be overridden. */}} {{- define "kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} -{{- end - +{{- end -}} {{/* Get Ingress API Version */}} {{- define "ingress.apiVersion" -}} From a347ff11a386eae7ae1f18666423539f94591fc1 Mon Sep 17 00:00:00 2001 From: jschaul Date: Wed, 18 Jan 2023 14:41:42 +0100 Subject: [PATCH 4/5] wording --- changelog.d/0-release-notes/chart-compatibility | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/0-release-notes/chart-compatibility b/changelog.d/0-release-notes/chart-compatibility index 0edbcf0b69c..54bf8bf8d07 100644 --- a/changelog.d/0-release-notes/chart-compatibility +++ b/changelog.d/0-release-notes/chart-compatibility @@ -1 +1 @@ -wire-server helm charts using Ingress resources are now compatible with kubernetes versions 1.22, 1.23 and 1.24. +wire-server helm charts using Ingress resources are now compatible with kubernetes versions 1.22, 1.23 and 1.24 (but keep being compatible with older versions of kubernetes). From 79f27d093e9f5a13d6a96e2167c5b1b548021a51 Mon Sep 17 00:00:00 2001 From: jschaul Date: Thu, 19 Jan 2023 12:49:56 +0100 Subject: [PATCH 5/5] go templating: don't munch the newline break after a comment --- .../nginx-ingress-services/templates/ingress_federator.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/nginx-ingress-services/templates/ingress_federator.yaml b/charts/nginx-ingress-services/templates/ingress_federator.yaml index 1e0eede9e77..bd9a6aa0b11 100644 --- a/charts/nginx-ingress-services/templates/ingress_federator.yaml +++ b/charts/nginx-ingress-services/templates/ingress_federator.yaml @@ -1,8 +1,8 @@ +{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} {{- if .Values.federator.enabled }} # We use a separate ingress for federator so that we can require client # certificates only for federation requests -{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} -{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} apiVersion: {{ include "ingress.apiVersion" . }} kind: Ingress metadata: