-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Optimize process of resources push to APISIX #133
Comments
There is not much frequency of using
Agree with this.
Previously, I used the event-based notification mechanism implemented by channel, which allows events to arrive at the specified Resource in an orderly and precise manner.
|
I believe the consideration about unifying overall structure can be also achieved if the design is good enough.
The current event-based notification also is hard coded since the order is fixed just like the sequential way.
Nope, a |
Need some specific design about how to unifying the relation |
I means one CRD may related many Routes/services/upstreams. Do you means they are all in one |
A |
This could be a later step. |
I think we should first refactor and abstract the APISIX HTTP Client object, and use sequential way to rewrite the dependencies delivery, then considering to strip the service creation and relax the dependency order. |
We have firstly optimized the apisix http client by #147. |
Closed since #147 merged. |
When
ApisixRoute
,ApisixUpstream
and other CRDs are watched by ingress controller, it converts these objects to the format of APISIX Resources, like Route, Upstream and etc.Currently, one rule in
ApisixRoute
object may generate a Route, Service, Upstream object; anAPISIXService
may generatea Service and Upstream object; an
ApisixUpstream
will generate an Upstream object. What's more, the order to push them (to APISIX) is important, we must push Upstream before Service, push Service before Route.Some drawbacks in current implementation:
ApisixRoute
is useless since all configurations in it are also in the Route, we can remove it;Operations for resources like Route, Service, Upstream and others can be abstracted as a
ResourceOperator
interface.For each resource change, we have a struct
ResourceChange
On a higher land, we can orchestrate the resource change to
ResourcesChange
We put Upstream in ResourcesChange[0] which means it has the first priority to apply, ResourcesChange[1] for Service and so on.
Note the whole apply process can not be atomic, we relay on the user to delete the broken CRD object if the apply process is aborted.
The text was updated successfully, but these errors were encountered: