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 }}