diff options
author | Jack Lucas <jflos@sonoris.net> | 2022-02-25 08:56:57 -0500 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2022-03-04 19:09:29 +0000 |
commit | 2b75d34e7507ef7b8dd366eed0afc7c3be6887e0 (patch) | |
tree | 7a72cb11beda84ae08a11c892b394be58ad204fd /kubernetes | |
parent | de97263a2ea4b7a134dc3d43784a6178909feabe (diff) |
[COMMON] Update Ingress API
Move from using the v1beta1 version of the Ingress API
(deprecated in k8s v1.19 and not present in v1.22+) to
the stable v1 version.
Issue-ID: OOM-2926
Signed-off-by: Jack Lucas <jflos@sonoris.net>
Change-Id: Icbd4bf3b8a8a0521160e277cde2977aef8a17faf
Diffstat (limited to 'kubernetes')
-rw-r--r-- | kubernetes/common/common/templates/_ingress.tpl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kubernetes/common/common/templates/_ingress.tpl b/kubernetes/common/common/templates/_ingress.tpl index 7fee67a7a4..f2741079c7 100644 --- a/kubernetes/common/common/templates/_ingress.tpl +++ b/kubernetes/common/common/templates/_ingress.tpl @@ -13,11 +13,18 @@ http: paths: - backend: - serviceName: {{ .name }} - servicePort: {{ .port }} + service: + name: {{ .name }} + port: + {{- if kindIs "string" .port }} + name: {{ .port }} + {{- else }} + number: {{ .port }} + {{- end }} {{- if .path }} path: {{ .path }} {{- end }} + pathType: ImplementationSpecific {{- end }} {{- end -}} @@ -69,7 +76,7 @@ nginx.ingress.kubernetes.io/ssl-redirect: "false" {{- $ingressEnabled := include "common.ingress._overrideIfDefined" (dict "currVal" $ingressEnabled "parent" (default (dict) .Values.global.ingress) "var" "enabled") }} {{- $ingressEnabled := include "common.ingress._overrideIfDefined" (dict "currVal" $ingressEnabled "parent" .Values.ingress "var" "enabledOverride") }} {{- if $ingressEnabled }} -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "common.fullname" . }}-ingress |