-
Notifications
You must be signed in to change notification settings - Fork 366
fix: use upstream id instead of inline upstream in traffic-split plugin #2546
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
Conversation
Signed-off-by: Ashing Zheng <[email protected]>
Signed-off-by: Ashing Zheng <[email protected]>
Signed-off-by: Ashing Zheng <[email protected]>
Signed-off-by: Ashing Zheng <[email protected]>
Signed-off-by: Ashing Zheng <[email protected]>
Signed-off-by: Ashing Zheng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the traffic-split plugin implementation to use upstream IDs instead of inline upstream objects, improving the dataplane configuration structure. The change ensures that upstreams are properly referenced by ID in traffic-split configurations while maintaining separate upstream definitions.
- Replace inline upstream objects with upstream_id references in traffic-split plugin
- Add proper upstream naming and ID generation for backend references
- Update Service struct to include an Upstreams field for managing multiple upstream definitions
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/adc/translator/httproute.go | Adds upstream naming/ID generation and uses upstream_id in traffic-split configurations |
| internal/adc/translator/apisixroute.go | Updates ApisixRoute translator to use upstream_id references and proper naming |
| api/v2/shared_types.go | Adds utility functions for composing upstream names |
| api/adc/types.go | Adds Upstreams field to Service struct |
| api/adc/zz_generated.deepcopy.go | Generated deep copy methods for new Upstreams field |
| .github/workflows/apisix-e2e-test.yml | Sets ADC_VERSION environment variable |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Ashing Zheng <[email protected]>
bzp2010
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are our tests based on the final results? Do they not need to be modified to verify the changes in the pull request?
The current test should be sufficient. If necessary, we can consider creating a new issue to track some more detailed assertions in the test.
|
Type of change:
What this PR does / why we need it:
ref: #2540 (comment)
In the traffic-split plugin, use upstream_id to replace inline upstream.
Pre-submission checklist: