From 363906955679e92fd2b4ca2d68357ef6bd285c54 Mon Sep 17 00:00:00 2001 From: Konstantin Grachev Date: Wed, 16 Nov 2022 16:41:43 +0300 Subject: [PATCH] Revert "Remove $fullName var from ingress templates" This reverts commit 92f8d4442c327e6958bddf1119ef1d72f0c0e96f. --- templates/n8n-ingress.yaml | 7 ++++--- templates/webhook-ingress.yaml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/n8n-ingress.yaml b/templates/n8n-ingress.yaml index 96c4d45..5330c0a 100644 --- a/templates/n8n-ingress.yaml +++ b/templates/n8n-ingress.yaml @@ -1,4 +1,5 @@ {{- if .Values.n8n.ingress.enabled -}} +{{- $fullName := include "n8n.fullname" . -}} {{- $svcPort := .Values.n8n.service.port -}} {{- if and .Values.n8n.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.n8n.ingress.annotations "kubernetes.io/ingress.class") }} @@ -14,7 +15,7 @@ apiVersion: extensions/v1beta1 {{- end }} kind: Ingress metadata: - name: {{ include "n8n.fullname" . }} + name: {{ $fullName }} labels: {{- include "n8n.labels" . | nindent 4 }} {{- with .Values.n8n.ingress.annotations }} @@ -46,11 +47,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "n8n.fullname" . }} + name: {{ $fullName }} port: number: {{ $svcPort }} {{- else }} - serviceName: {{ include "n8n.fullname" . }} + serviceName: {{ $fullName }} servicePort: {{ $svcPort }} {{- end }} {{- end }} diff --git a/templates/webhook-ingress.yaml b/templates/webhook-ingress.yaml index 583456f..61c9af9 100644 --- a/templates/webhook-ingress.yaml +++ b/templates/webhook-ingress.yaml @@ -1,4 +1,5 @@ {{- if .Values.webhook.ingress.enabled -}} +{{- $fullName := include "n8n.fullname" . -}} {{- $svcPort := .Values.webhook.service.port -}} {{- if and .Values.webhook.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.webhook.ingress.annotations "kubernetes.io/ingress.class") }} @@ -14,7 +15,7 @@ apiVersion: extensions/v1beta1 {{- end }} kind: Ingress metadata: - name: {{ include "n8n.fullname" . }}-webhook + name: {{ $fullName }}-webhook labels: {{- include "n8n.labels" . | nindent 4 }} {{- with .Values.webhook.ingress.annotations }} @@ -46,11 +47,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "n8n.fullname" . }}-webhook + name: {{ $fullName }} port: number: {{ $svcPort }} {{- else }} - serviceName: {{ include "n8n.fullname" . }}-webhook + serviceName: {{ $fullName }} servicePort: {{ $svcPort }} {{- end }} {{- end }}