Remove $fullName var from ingress templates
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2022-11-16 16:37:50 +03:00
parent 5500ec6642
commit 92f8d4442c
2 changed files with 6 additions and 8 deletions

View File

@ -1,5 +1,4 @@
{{- if .Values.n8n.ingress.enabled -}} {{- if .Values.n8n.ingress.enabled -}}
{{- $fullName := include "n8n.fullname" . -}}
{{- $svcPort := .Values.n8n.service.port -}} {{- $svcPort := .Values.n8n.service.port -}}
{{- if and .Values.n8n.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- 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") }} {{- if not (hasKey .Values.n8n.ingress.annotations "kubernetes.io/ingress.class") }}
@ -15,7 +14,7 @@ apiVersion: extensions/v1beta1
{{- end }} {{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }} name: {{ include "n8n.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n.labels" . | nindent 4 }}
{{- with .Values.n8n.ingress.annotations }} {{- with .Values.n8n.ingress.annotations }}
@ -47,11 +46,11 @@ spec:
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service: service:
name: {{ $fullName }} name: {{ include "n8n.fullname" . }}
port: port:
number: {{ $svcPort }} number: {{ $svcPort }}
{{- else }} {{- else }}
serviceName: {{ $fullName }} serviceName: {{ include "n8n.fullname" . }}
servicePort: {{ $svcPort }} servicePort: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -1,5 +1,4 @@
{{- if .Values.webhook.ingress.enabled -}} {{- if .Values.webhook.ingress.enabled -}}
{{- $fullName := include "n8n.fullname" . -}}
{{- $svcPort := .Values.webhook.service.port -}} {{- $svcPort := .Values.webhook.service.port -}}
{{- if and .Values.webhook.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- 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") }} {{- if not (hasKey .Values.webhook.ingress.annotations "kubernetes.io/ingress.class") }}
@ -15,7 +14,7 @@ apiVersion: extensions/v1beta1
{{- end }} {{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }}-webhook name: {{ include "n8n.fullname" . }}-webhook
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n.labels" . | nindent 4 }}
{{- with .Values.webhook.ingress.annotations }} {{- with .Values.webhook.ingress.annotations }}
@ -47,11 +46,11 @@ spec:
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service: service:
name: {{ $fullName }} name: {{ include "n8n.fullname" . }}-webhook
port: port:
number: {{ $svcPort }} number: {{ $svcPort }}
{{- else }} {{- else }}
serviceName: {{ $fullName }} serviceName: {{ include "n8n.fullname" . }}-webhook
servicePort: {{ $svcPort }} servicePort: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}