diff --git a/charts/portalmodelo/v0.5.0/templates/ingress.yaml b/charts/portalmodelo/v0.5.0/templates/ingress.yaml index 8d61d31..6f6cb7d 100644 --- a/charts/portalmodelo/v0.5.0/templates/ingress.yaml +++ b/charts/portalmodelo/v0.5.0/templates/ingress.yaml @@ -4,7 +4,9 @@ {{- $hostPrefix := .Values.portal.hostprefix -}} {{- $addPrefix := .Values.portal.addprefix -}} {{- $zopeFolder := .Values.portal.zopefolder -}} -{{- 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 @@ -77,10 +79,20 @@ spec: {{- end }} {{- 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 }}-plone + port: + number: 8080 + {{- else }} serviceName: {{ $fullName }}-plone servicePort: 8080 + {{- end }} {{- if .Values.portal.addprefix }} - host: "{{ $addPrefix }}.{{ $hostName }}" http: @@ -99,9 +111,19 @@ spec: {{- end }} {{- 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: 8080 + {{- else }} serviceName: {{ $fullName }}-plone servicePort: 8080 + {{- end }} {{- end }} {{- end }}