From 064a9785bef86bf861969334877d75bb033717f9 Mon Sep 17 00:00:00 2001 From: Niall Thomson Date: Mon, 25 Nov 2024 15:36:50 -0700 Subject: [PATCH] feat: Upgrade helm ingress to v1 (#681) --- .../charts/ui/templates/ingress.yaml | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/deploy/kubernetes/charts/ui/templates/ingress.yaml b/deploy/kubernetes/charts/ui/templates/ingress.yaml index 14a00b95d..c1b22496e 100644 --- a/deploy/kubernetes/charts/ui/templates/ingress.yaml +++ b/deploy/kubernetes/charts/ui/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "ui.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -16,7 +12,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- if .Values.ingress.class }} + {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }} {{- end }} {{- if .Values.ingress.tls }} @@ -30,13 +26,28 @@ spec: {{- end }} {{- end }} rules: + {{- if .Values.ingress.hosts }} {{- range .Values.ingress.hosts }} - host: {{ . | quote }} http: paths: - path: / + pathType: Prefix backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} {{- end }} - {{- end }} + {{- else }} + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} +{{- end }}