Skip to content
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

proposal: need an interface or function to translate old resource objects #1186

Open
2 of 5 tasks
AlinsRan opened this issue Jul 26, 2022 · 3 comments
Open
2 of 5 tasks
Labels

Comments

@AlinsRan
Copy link
Contributor

AlinsRan commented Jul 26, 2022

backgroup

Ref:

At present, for ApisixRoute Ingress ... resource update, we use the TranslateUpstream method to translate old objects. This method requires parsing the latest services to build objects, resulting in data inconsistency.

Due to the wrong construction of upstream objects, upstream cannot be deleted, resulting in object redundancy.

proposal

Implement an interface or function for related resources

  1. Get route object from cache.
  2. Using route to construct Upstream and PluginConfig.
  3. Compare and write APISIX.

dependencies

@AlinsRan
Copy link
Contributor Author

#1050 Or we can realize the function of regularly cleaning up redundant objects in upstream.

@tao12345666333
Copy link
Member

Using route to construct Upstream and PluginConfig.

why we need this one?

@AlinsRan
Copy link
Contributor Author

AlinsRan commented Jul 26, 2022

Using route to construct Upstream and PluginConfig.

why we need this one?

Because the route object contains upstream_ id and plugin_id. For delete, we only need these fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants