kumahq / kuma

🐻 The multi-zone service mesh for containers, Kubernetes and VMs. Built with Envoy. CNCF Sandbox Project.
https://kuma.io/install
Apache License 2.0
3.68k stars 333 forks source link

GatewayClass is not reconciled when CRD applied after `kuma-cp` deployed #11648

Open lobkovilya opened 1 month ago

lobkovilya commented 1 month ago

What happened?

Repro:

1. helm install kuma
2. kubectl apply API Gateway CustomResourceDefinitions
3. kubectl apply API Gateway.yaml

We should either update the guide https://kuma.io/docs/2.8.x/using-mesh/managing-ingress-traffic/gateway-api/ or fix it in the code.

michaelbeaumont commented 1 month ago

Isn't this described basically in the docs? Though maybe we should make the "do your own Gateway class" the default tab.

There's nothing to fix in the code IMO. It's a one time thing that happens via Helm. I suppose it's possible write a controller that is constantly checking for the presence of the CRDs but how does it know the difference between Gateway class deleted and never created?

michaelbeaumont commented 1 month ago

It may in fact be that the CP needs to be restarted once the CRDs are installed. In any case we can include a sentence or two to be explicit about how to manage this yourself after Kuma install

slonka commented 1 month ago

Triage: need to gather more info about what other projects do in this case. If not possible then just add to docs to restart the cp

slonka commented 1 month ago

From @czeslavo:

KIC has a DynamicCRDController wrapper that, at startup, ensures whether a required CRD is installed and only then starts the controller. If not, it sets up a watch on CustomResourceDefinition and runs the controller when the CRD gets installed. It doesn't handle the uninstall case though.