Browse Source

Fix Ingress in portalmodelo for newer K8S versions

master
Fábio Kaiser Rauber 2 years ago
parent
commit
e2a61b962c
  1. 24
      charts/portalmodelo/v0.5.0/templates/ingress.yaml

24
charts/portalmodelo/v0.5.0/templates/ingress.yaml

@ -4,7 +4,9 @@
{{- $hostPrefix := .Values.portal.hostprefix -}} {{- $hostPrefix := .Values.portal.hostprefix -}}
{{- $addPrefix := .Values.portal.addprefix -}} {{- $addPrefix := .Values.portal.addprefix -}}
{{- $zopeFolder := .Values.portal.zopefolder -}} {{- $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 apiVersion: networking.k8s.io/v1beta1
{{- else -}} {{- else -}}
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
@ -77,10 +79,20 @@ spec:
{{- end }} {{- end }}
{{- else }} {{- else }}
- path: /* - path: /*
{{- end }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: ImplementationSpecific
{{- end }} {{- end }}
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}-plone
port:
number: 8080
{{- else }}
serviceName: {{ $fullName }}-plone serviceName: {{ $fullName }}-plone
servicePort: 8080 servicePort: 8080
{{- end }}
{{- if .Values.portal.addprefix }} {{- if .Values.portal.addprefix }}
- host: "{{ $addPrefix }}.{{ $hostName }}" - host: "{{ $addPrefix }}.{{ $hostName }}"
http: http:
@ -99,9 +111,19 @@ spec:
{{- end }} {{- end }}
{{- else }} {{- else }}
- path: /* - path: /*
{{- end }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: ImplementationSpecific
{{- end }} {{- end }}
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: 8080
{{- else }}
serviceName: {{ $fullName }}-plone serviceName: {{ $fullName }}-plone
servicePort: 8080 servicePort: 8080
{{- end }} {{- end }}
{{- end }}
{{- end }} {{- end }}

Loading…
Cancel
Save