Revert "Remove $fullName var from ingress templates"

This reverts commit 92f8d4442c.
This commit is contained in:
2022-11-16 16:41:43 +03:00
parent 92f8d4442c
commit 3639069556
2 changed files with 8 additions and 6 deletions

View File

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

View File

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