Fix naming of the ingress frontend

Change-Id: I99fe581c830a2508a0a85ad78fe768ef466dbe74
This commit is contained in:
jmarchel7bulls 2024-05-15 12:07:47 +02:00 committed by Jan Marchel
parent 7c4b1b52cb
commit 688d6ce649

View File

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