WIFI-1998 support newer api versions (#74)

* migrate to newer Ingress API versions
* add changelog entry
This commit is contained in:
Max
2021-04-26 16:05:58 +02:00
committed by GitHub
parent c73350c535
commit 7f0da5969d
4 changed files with 73 additions and 3 deletions

View File

@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- export servo MBeans with JMX Prometheus exporter [#65](https://github.com/Telecominfraproject/wlan-cloud-helm/pull/65)
- render post-deployment message [#73](https://github.com/Telecominfraproject/wlan-cloud-helm/pull/73)
### Changed
- migrate to networking.k8s.io/v1 API version for Ingress resources [#74](https://github.com/Telecominfraproject/wlan-cloud-helm/pull/74)
## [1.0.1] - 2021-04-12
### Changed

View File

@@ -1,7 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "common.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
@@ -36,15 +38,35 @@ spec:
paths:
{{- if $.Values.ingress.lb_https_redirect }}
- path: /*
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
service:
name: ssl-redirect
port:
name: use-annotation
{{- else -}}
serviceName: ssl-redirect
servicePort: use-annotation
{{- end }}
{{- end }}
{{- range .paths }}
- path: {{ . }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else -}}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,7 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "common.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
@@ -36,15 +38,35 @@ spec:
paths:
{{- if $.Values.ingress.lb_https_redirect }}
- path: /*
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
service:
name: ssl-redirect
port:
name: use-annotation
{{- else -}}
serviceName: ssl-redirect
servicePort: use-annotation
{{- end }}
{{- end }}
{{- range .paths }}
- path: {{ . }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else -}}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,7 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "common.fullname" . -}}
{{- $svcPort := .Values.service.port1 -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
@@ -34,15 +36,35 @@ spec:
paths:
{{- if $.Values.ingress.lb_https_redirect }}
- path: /*
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
service:
name: ssl-redirect
port:
name: use-annotation
{{- else -}}
serviceName: ssl-redirect
servicePort: use-annotation
{{- end }}
{{- end }}
{{- range .paths }}
- path: {{ . }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else -}}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end -}}
{{- end }}
{{- end }}
{{- end }}