Add a robust E2E testing suite for Kmesh Locality Load Balancing.#1585
Add a robust E2E testing suite for Kmesh Locality Load Balancing.#1585sarafarajnasardi wants to merge 5 commits intokmesh-net:mainfrom
Conversation
Signed-off-by: Sarafaraj Nasardi <sarafarajnasardi786@gmail.com>
Signed-off-by: Sarafaraj Nasardi <sarafarajnasardi786@gmail.com>
Signed-off-by: Sarafaraj Nasardi <sarafarajnasardi786@gmail.com>
Signed-off-by: Sarafaraj Nasardi <sarafarajnasardi786@gmail.com>
|
Welcome @sarafarajnasardi! It looks like this is your first PR to kmesh-net/kmesh 🎉 |
Summary of ChangesHello @sarafarajnasardi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a comprehensive End-to-End testing suite for Kmesh's Locality Load Balancing feature. The suite is designed to validate Kmesh's ability to respect administrative locality boundaries (region, zone, subzone) for traffic routing, ensuring optimal performance and high availability. It includes dynamic topology simulation, advanced pod scheduling, and verifies both locality priority and failover mechanisms. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Nodes labeled with care, Traffic flows to local zone, Failover, then peace. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive End-to-End test suite for Kmesh Locality Load Balancing, which is a valuable addition for ensuring feature correctness. The test implementation is well-structured and covers key scenarios like locality-aware routing and failover. My feedback focuses on improving the implementation by replacing shell executions of kubectl with direct Kubernetes API calls. This will enhance the tests' robustness, security, and maintainability by removing external dependencies and adhering to best practices for Kubernetes client interaction in Go.
Signed-off-by: Sarafaraj Nasardi <sarafarajnasardi786@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| Subsets: []echo.SubsetConfig{ | ||
| { | ||
| Replicas: 1, | ||
| Version: "v1", // Local to client | ||
| Labels: map[string]string{"app": "server", "version": "v1"}, | ||
| }, | ||
| { | ||
| Replicas: 1, | ||
| Version: "v2", // Remote to client | ||
| Labels: map[string]string{"app": "server", "version": "v2"}, |
There was a problem hiding this comment.
I think you donot need to create subset here
There was a problem hiding this comment.
IC, you created two deployment
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Review
What type of PR is this?
/kind enhancement
What this PR does / why we need it
This PR introduces a robust End-to-End (E2E) testing suite for Kmesh Locality Load Balancing.
As Kmesh moves toward feature parity with Istio’s advanced traffic management, it is critical to ensure that traffic correctly respects administrative locality boundaries (region, zone, and subzone) to achieve optimal performance and high availability.
Technical Implementation Details
1. Dynamic Multi-Zone Topology Simulation
topology.kubernetes.io/regiontopology.kubernetes.io/zonetopology.kubernetes.io/subzone2. Advanced Pod Scheduling & Taint Handling
patchDeploymentutility usingkubectl patchto dynamically apply:nodeSelectortolerations3. Verification Scenarios
Locality Priority
Verifies that a client in
region1/zone1sends traffic exclusively to the server subset in the same zone whenlocalityLbSettingis enabled in theDestinationRule.Failover Logic
Simulates a zone-level outage by scaling the local server subset to zero and verifies that Kmesh seamlessly fails over to a remote subset in
zone2.4. Environmental Stability & Reliability
t.Cleanupto restore node labels to their original state after test execution.retrypackage to handle asynchronous resource readiness.Which issue(s) this PR fixes
Fixes #1146
Special notes for your reviewer
istio.io/istio/pkg/test/frameworkandechocomponents to maintain consistency with existing Kmesh integration tests.Does this PR introduce a user-facing change?
NONE
release-note