From d01ace4af14f9158d110f7a756022d17f39f241d Mon Sep 17 00:00:00 2001 From: FreedomSex Date: Wed, 3 Nov 2021 12:29:14 +0400 Subject: [PATCH] Ingress Resource Changes Kubernetes 1.19 Ingress Resource Changes 1.19 Ingress resource moved out of beta in v1.19. This is a good time to modernize Ingress resources. We thought that the ingress.class annotation would go away but it cannot yet. In v1.19 Ingress API is now networking.k8s.io/v1. All Ingress resources should migrate to this before v1.22. The extensions/v1beta1 and networking.k8s.io/v1beta1 API versions of Ingress will no longer be served in v1.22. API versions and resources are being automatically mutated in 1.19. While your manifest may say extensions/v1beta1, if you query the cluster the resource will report as networking.k8s.io/v1 and be in the new format. The most simplistic way to modernize your resources is to use the automatically mutated version from the cluster. This is a starting point and is basic compatibility only. Important: New spec.ingressClassName field is not ready for use! In GKE 1.19 the Ingress class annotation is still required: kubernetes.io/ingress.class: nginx This is required because the GKE built-in GCE ingress does not honor the new spec.ingressClassName field, it only honors the old annotation. When new Ingresses are created, if both the class field and annotation are set, an error will be returned. Thus we must stay with the annotation for now. Ingress GCE reference: https://github.com/kubernetes/ingress-gce/issues/1301 Ingress NGINX and GCE ingress have not yet updated their documentation for this new Ingress version so all this can be somewhat confusing. --- deploy/charts/mysql-operator/templates/orc-ingress.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/charts/mysql-operator/templates/orc-ingress.yaml b/deploy/charts/mysql-operator/templates/orc-ingress.yaml index e00e7df28..b9bc22a10 100644 --- a/deploy/charts/mysql-operator/templates/orc-ingress.yaml +++ b/deploy/charts/mysql-operator/templates/orc-ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.orchestrator.ingress.enabled -}} {{- $fullName := include "mysql-operator.fullname" . -}} -apiVersion: extensions/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }}