[go: up one dir, main page]

Skip to content

Support setting Ingress APIVersion to networking.k8s.io/v1 to support Kubernetes 1.22

Summary

Kubernetes 1.22 and newer removed support for the extensions/v1beta1 and networking.k8s.io/v1beta1 API versions. Currently, we set Ingress apiVersion to extensions/v1beta1 by default in templates/_helpers.tpl#L535.

networking.k8s.io/v1 was available as of Kubernetes 1.19, but as far as I know we technically still support versions old than that, so we should ensure that those on older versions still get the newest available API version using Helm's Capabilities calculation.

https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122:

Notable changes:

  • spec.backend is renamed to spec.defaultBackend
  • The backend serviceName field is renamed to service.name
  • Numeric backend servicePort fields are renamed to service.port.number
  • String backend servicePort fields are renamed to service.port.name pathType is now required for each specified path. Options are Prefix, Exact, and ImplementationSpecific. To match the undefined v1beta1 behavior, use ImplementationSpecific.

Acceptance criteria

  • Ingress apiVersion can be set to networking.k8s.io/v1 for Kubernetes versions 1.22 and newer
  • Ingress apiVersion is still automatically set to extensions/v1beta1 or networking.k8s.io/v1beta1 on older versions of K8s
Edited by Mitchell Nielsen