Fix ingress objects for K8s 1.19+

This commit is contained in:
Alexander Olofsson 2021-09-05 02:54:04 +02:00
parent b8166b9a6b
commit 6421456f78
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
7 changed files with 30 additions and 15 deletions

View file

@ -39,7 +39,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: {{ $svcPort }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}

View file

@ -41,7 +41,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: http
port:
name: http
{{- else }}
serviceName: {{ $fullName }}
servicePort: http

View file

@ -40,7 +40,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: {{ $svcPort }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}

View file

@ -66,7 +66,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $service }}
port: 8083
port:
number: 8083
{{- else }}
serviceName: {{ $service }}
servicePort: 8083
@ -80,7 +81,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $service }}
port: 8083
port:
number: 8083
{{- else }}
serviceName: {{ $service }}
servicePort: 8083
@ -99,7 +101,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $service }}
port: 8083
port:
number: 8083
{{- else }}
serviceName: {{ $service }}
servicePort: 8083
@ -113,7 +116,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $service }}
port: 8083
port:
number: 8083
{{- else }}
serviceName: {{ $service }}
servicePort: 8083
@ -144,7 +148,8 @@ spec:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: 8008
port:
number: 8008
{{- else }}
serviceName: {{ $fullName }}
servicePort: 8008
@ -160,7 +165,8 @@ spec:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: 8008
port:
number: 8008
{{- else }}
serviceName: {{ $fullName }}
servicePort: 8008
@ -177,7 +183,8 @@ spec:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $wkName }}
port: 80
port:
number: 80
{{- else -}}
serviceName: {{ $wkName }}
servicePort: 80
@ -190,7 +197,8 @@ spec:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $wkName }}
port: 80
port:
number: 80
{{- else }}
serviceName: {{ $wkName }}
servicePort: 80
@ -204,7 +212,8 @@ spec:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: 8008
port:
number: 8008
{{- else }}
serviceName: {{ $fullName }}
servicePort: 8008

View file

@ -770,7 +770,8 @@ ingress:
# backend:
# service:
# name: matrix-media-repo
# port: 8000
# port:
# number: 8000
# # K8s <1.19
# - path: /_matrix/media
# backend:

View file

@ -43,7 +43,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: http
port:
name: http
{{- else }}
serviceName: {{ $fullName }}
servicePort: http

View file

@ -37,7 +37,8 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: http
port:
name: http
{{- else }}
serviceName: {{ $fullName }}
servicePort: http