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

fix(apisix): store stream route name correctly #156

Merged
merged 7 commits into from
Jul 20, 2024

Conversation

bzp2010
Copy link
Collaborator

@bzp2010 bzp2010 commented Jul 20, 2024

Description

Synchronization fails due to the fact that APISIX resources are non-standard, e.g. the stream route does not have a name field that can be used to store names.

This PR has some compatibility fixes, it uses labels to store a key called __ADC_NAME to store the name, which is transparent to the user, and is automatically added during sync and removed during dump.

I'm going to push for standardization of resource objects in APISIX, but until that's done, this compatibility measure is unavoidable.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible

@bzp2010 bzp2010 marked this pull request as ready for review July 20, 2024 05:01
@bzp2010 bzp2010 requested a review from pottekkat July 20, 2024 05:01
@@ -108,7 +108,7 @@ export interface StreamRoute {
id: string;
desc?: string;
labels?: Labels;
name: string;
//name: string; // As of 3.9.1, APISIX does not support name on the stream route
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove this unused value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I will add it to APISIX. We can use it later.

@bzp2010 bzp2010 merged commit 1baddc1 into main Jul 20, 2024
5 checks passed
@bzp2010 bzp2010 deleted the bzp/fix-apisix-stream-route-name branch July 24, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants