From 7a21fd2c669a51e6b09f1f75123b700b81cb4e54 Mon Sep 17 00:00:00 2001 From: Keny Villela Date: Tue, 2 May 2023 16:04:27 -0300 Subject: [PATCH] return helm 0.2.2 with v1 --- charts/sigi/v0.2.2/templates/ingress.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/sigi/v0.2.2/templates/ingress.yaml b/charts/sigi/v0.2.2/templates/ingress.yaml index 46039e2..fa56bfd 100644 --- a/charts/sigi/v0.2.2/templates/ingress.yaml +++ b/charts/sigi/v0.2.2/templates/ingress.yaml @@ -1,7 +1,9 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "sigi.fullname" . -}} {{- $hostName := .Values.sigi.hostname -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} apiVersion: extensions/v1beta1 @@ -58,6 +60,13 @@ spec: pathType: ImplementationSpecific {{- end }} backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: 80 + {{- else }} serviceName: {{ $fullName }} servicePort: http + {{- end }} {{- end }}