mirror of
https://github.com/puppetlabs/vmpooler-deployment.git
synced 2026-01-26 03:28:41 -05:00
(DIO-3157) Update ingress for k8s 1.22
This commit is contained in:
parent
b3270c2bd0
commit
d04767c4c3
8 changed files with 56 additions and 27 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue