klustair / klustair-helm

Helm chart do deploy klustair with anchore
Apache License 2.0
7 stars 4 forks source link

fix ingress API for k8s > 1.22. #43

Open hugodopradofernandes opened 2 years ago

hugodopradofernandes commented 2 years ago

fix ingress API for k8s > 1.22. Current value is deprecated https://kubernetes.io/docs/reference/using-api/deprecation-guide/

Ingress

The extensions/v1beta1 and networking.k8s.io/v1beta1 API versions of Ingress is no longer served as of v1.22.

Migrate manifests and API clients to use the networking.k8s.io/v1 API version, available since v1.19.
All existing persisted objects are accessible via the new API
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
hugodopradofernandes commented 2 years ago

Also other fields with issues: https://stackoverflow.com/questions/64125048/get-error-unknown-field-servicename-in-io-k8s-api-networking-v1-ingressbacken

I recommend also fixing these

Ingress and IngressClass resources have graduated to networking.k8s.io/v1. Ingress and IngressClass types in the extensions/v1beta1 and networking.k8s.io/v1beta1 API versions are deprecated and will no longer be served in 1.22+. Persisted objects can be accessed via the networking.k8s.io/v1 API. Notable changes in v1 Ingress objects (v1beta1 field names are unchanged):