aws / aws-application-networking-k8s

A Kubernetes controller for Amazon VPC Lattice
https://www.gateway-api-controller.eks.aws.dev/
Apache License 2.0
157 stars 48 forks source link

Update gateway api CRD versions? #638

Open vd-arnaud opened 1 month ago

vd-arnaud commented 1 month ago

The current version (v1.0.5) of the gateway-api-controller chart comes with crds that are quite old:

Such CRDs are from this release which is more than one year old

The last release from kubernetes-sigs includes:

It leads to issues because other actors in this ecosystem uses new CRDs version, for example the last version of external-dns is using HTTPRoute v1. So one had to update this particular CRD to be able to use gateway-api-controller AND external-dns. Hopefully the last HTTPRoute CRD still includes v1beta1, but for how long?

It would be great if you plan to update CRDs in future release 🙏

zijun726911 commented 1 month ago

If you install the v1 gateway API CRDs in your cluster by: https://github.com/aws/aws-application-networking-k8s/blob/1862bef9b5f4956b08f34b80723464a99682f542/docs/contributing/developer.md?plain=1#L44-L47 and run the v1.0.5 controller and create v1 Gateway, v1 HTTPRoute, what it happen? In the e2e test code we actually already used the V1 gateway api resource, for example: https://github.com/aws/aws-application-networking-k8s/blob/e85369a9808835f4eab31c88edb9bcc920870e2c/test/suites/integration/httproute_path_match_test.go#L29 and it can work for us.

But your suggestion really make sense, we need to install the v1 CRDs by default in the helm chart and use v1 CRDs in the controller code.

vd-arnaud commented 1 month ago

I did the test to install last release from kubernetes-sigs then to install gateway-api-controller v1.0.5 and I got some error in aws-gateway-controller-chart pods so I didn't go further.

Here is a sample of errors I've got:

{"level":"error","ts":"2024-05-16T17:13:48.717Z","logger":"runtime.controller-runtime.source.EventHandler","caller":"source/kind.go:68","msg":"failed to get informer from cache","error":"failed to get API group resources: unable to retrieve the complete list of server APIs: gateway.networking.k8s.io/v1alpha2: the server could not find the requested resource"}

which makes sense: gateway-api-controller tries to fetch gateway using v1alpha2 which is not available anymore with new CRDs. I "fixed" this error by downgrading Gateway CRD and I got similar error with GatewayClass

Thanks for your interest in this, please tell me if I can help 👍

vd-arnaud commented 1 month ago

Hello, small update from our side, we are now using DNSEndpoint instead of HTTPRoute as a source for our external-dns configuration and it kind of solved the issue.

I still think it would be nice to have updated CRDs to prevent some similar issues in the future (the possibility to have differents piece of software using those CRDs is not null at all!)