(DIO-3157) Update ingress for k8s 1.22

This commit is contained in:
suckatrash 2022-06-03 08:54:52 -07:00
parent b3270c2bd0
commit d04767c4c3
No known key found for this signature in database
GPG key ID: 1A9EE78B881BED99
8 changed files with 56 additions and 27 deletions

View file

@ -1,7 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "vmpooler.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- 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
@ -21,9 +23,19 @@ spec:
http:
paths:
- backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}-api
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}-api
servicePort: {{ $svcPort }}
{{- end }}
path: /
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: ImplementationSpecific
{{- end }}
{{ if .Values.ingress.useTLS -}}
tls:
- hosts: