diff --git a/charts/sigi/v0.2.2/templates/ingress.yaml b/charts/sigi/v0.2.2/templates/ingress.yaml index c82fe77..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 @@ -53,8 +55,18 @@ spec: - path: / {{- else }} - path: /* + {{- end }} + {{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} + 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 }}