Open lingsamuel opened 2 years ago
+1 I agree with you.
Do you have a more specific plan? We can put this proposal into this year's roadmap
Perhaps we could create an interface called "(Feature)Provider". The provider holds several small controllers and associated clientet/listers/informers.
Also, we should separate the translators and only make the Kubernetes translator publicly accessible, since any other translator could potentially rely on it. APISIX Ingress and any other CRD translators should be private.
pkg/controller
- former pkg/ingress
)
SGTM
I prefer to rename KubernetesProvider to CommonProvider.
When dealing with various resources(Ingress/CR/Gateway resource), we may need to deal with these basic resources of Kubernetes.
As support for the Gateway API progressed, we needed to redesign the structure of
pkg/ingress
. This directory now has multiple types of resources mixed together: Kubernetes native resources, APISIX Ingress resources, and Gateway API resources. More types of resources may be added in the future. In addition, thecontroller.go
file has become increasingly large.We need to redesign the controller so that supporting different resources doesn't require massive changes to the outer files, and to keep the changes in a smaller module as much as possible.