From 6421456f78d7c39265f885f48ee247e7f022c67c Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Sun, 5 Sep 2021 02:54:04 +0200 Subject: [PATCH] Fix ingress objects for K8s 1.19+ --- charts/element-web/templates/ingress.yaml | 3 ++- charts/funkwhale/templates/ingress.yaml | 3 ++- .../matrix-media-repo/templates/ingress.yaml | 3 ++- charts/matrix-synapse/templates/ingress.yaml | 27 ++++++++++++------- charts/matrix-synapse/values.yaml | 3 ++- charts/netbox/templates/ingress.yaml | 3 ++- charts/radosgw/templates/ingress.yaml | 3 ++- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/charts/element-web/templates/ingress.yaml b/charts/element-web/templates/ingress.yaml index 61db19f..be4311d 100644 --- a/charts/element-web/templates/ingress.yaml +++ b/charts/element-web/templates/ingress.yaml @@ -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 }} diff --git a/charts/funkwhale/templates/ingress.yaml b/charts/funkwhale/templates/ingress.yaml index ae27428..ed5ae79 100644 --- a/charts/funkwhale/templates/ingress.yaml +++ b/charts/funkwhale/templates/ingress.yaml @@ -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 diff --git a/charts/matrix-media-repo/templates/ingress.yaml b/charts/matrix-media-repo/templates/ingress.yaml index 72aae7a..5486f33 100644 --- a/charts/matrix-media-repo/templates/ingress.yaml +++ b/charts/matrix-media-repo/templates/ingress.yaml @@ -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 }} diff --git a/charts/matrix-synapse/templates/ingress.yaml b/charts/matrix-synapse/templates/ingress.yaml index 541b1ec..c71f658 100644 --- a/charts/matrix-synapse/templates/ingress.yaml +++ b/charts/matrix-synapse/templates/ingress.yaml @@ -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 diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index fdaeaf7..c698e4c 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -770,7 +770,8 @@ ingress: # backend: # service: # name: matrix-media-repo - # port: 8000 + # port: + # number: 8000 # # K8s <1.19 # - path: /_matrix/media # backend: diff --git a/charts/netbox/templates/ingress.yaml b/charts/netbox/templates/ingress.yaml index 6627cc9..22588fb 100644 --- a/charts/netbox/templates/ingress.yaml +++ b/charts/netbox/templates/ingress.yaml @@ -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 diff --git a/charts/radosgw/templates/ingress.yaml b/charts/radosgw/templates/ingress.yaml index d62040a..ec2bf1b 100644 --- a/charts/radosgw/templates/ingress.yaml +++ b/charts/radosgw/templates/ingress.yaml @@ -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