-
Notifications
You must be signed in to change notification settings - Fork 19
test: add the tests when public ip already exists in azure profile #300
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
Title(Describe updated until commit 1dc41ad)Add test for duplicate trafficManagerBackend and update documentation Description
Changes walkthrough 📝
|
PR Reviewer Guide 🔍(Review updated until commit 1dc41ad)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 1dc41ad Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit e73e2e6
Suggestions up to commit e73e2e6
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
==========================================
- Coverage 80.54% 80.29% -0.25%
==========================================
Files 29 29
Lines 4101 4101
==========================================
- Hits 3303 3293 -10
- Misses 633 643 +10
Partials 165 165 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Adds an end-to-end test to handle cases where a service’s public IP already exists in an Azure Traffic Manager profile, updates cleanup logic to ignore not-found errors, and refreshes related documentation links and troubleshooting guidance.
- Ignore not-found errors when cleaning up trafficManagerBackends
- Introduce a new E2E scenario for duplicate-creation of trafficManagerBackend
- Document the “public IP already exists” error and correct demo links
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/e2e/traffic_manager_test.go | Wrap delete in IgnoreNotFound and add a duplicate-backend test |
| docs/toubleshooting/DNSBasedGlobalLoadBalancing.md | Add troubleshooting entry for existing public IP and sample output |
| docs/demos/TrafficManagerProfile/session-migrate-to-another-region/README.md | Fix taints-tolerations URL |
| docs/demos/TrafficManagerProfile/session-migrate-to-another-cluster/README.md | Fix taints-tolerations URL |
Comments suppressed due to low confidence (2)
docs/toubleshooting/DNSBasedGlobalLoadBalancing.md:138
- Remove the extra space between the backslash and the escaped quote so it reads
"error"instead of\ "error"for valid YAML/JSON escaping.
\ "error": {
docs/troubleshooting/DNSBasedGlobalLoadBalancing.md:129
- Indent this sub-bullet two spaces further under the numbered list item to ensure proper Markdown nesting and rendering.
- Please use the existing trafficManagerBackend to manage your endpoints exported by the service.
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
Adds an E2E test for handling an existing public IP in an Azure Traffic Manager profile and updates related documentation.
- Enhanced test teardown to ignore not-found errors and introduced a new test case for duplicate
TrafficManagerBackend. - Added a troubleshooting entry for when a public IP already exists in the Traffic Manager profile.
- Updated demo README links pointing to the taints-tolerations documentation on the website.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/e2e/traffic_manager_test.go | Ignore not-found errors in cleanup and add a test for creating a second backend against the same service. |
| docs/toubleshooting/DNSBasedGlobalLoadBalancing.md | Add a new step explaining the “public IP already exists” error and its workaround. |
| docs/demos/TrafficManagerProfile/session-migrate-to-another-region/README.md | Update taints-tolerations link to the kubefleet-dev website. |
| docs/demos/TrafficManagerProfile/session-migrate-to-another-cluster/README.md | Update taints-tolerations link to the kubefleet-dev website. |
Comments suppressed due to low confidence (2)
docs/demos/TrafficManagerProfile/session-migrate-to-another-region/README.md:166
- Verify that the updated URL to the taints-tolerations doc is correct and matches the live site structure to avoid broken links.
- Remove the env label from the `aks-member-1` & `aks-member-3` or add [a taint on these two members](https://kubefleet-dev.github.io/website/docs/how-tos/taints-tolerations/) so that the cluster won't be picked by the `clusterResourcePlacement` again.
docs/demos/TrafficManagerProfile/session-migrate-to-another-cluster/README.md:155
- Ensure this link to the taints-tolerations guide is valid and leads to the intended documentation on the live kubefleet-dev site.
- Remove the env label from the `aks-member-1` or add [a taint on the member](https://kubefleet-dev.github.io/website/docs/how-tos/taints-tolerations/) so that the cluster won't be picked by the `clusterResourcePlacement` again.
What type of PR is this?
/kind test
What this PR does / why we need it:
Adding a webhook can blocking cx to create a duplicate trafficManagerBackend, which involves more work considering there's no validation webhook today.
For now, we keep the implementation as it's today, and let the controller retry.
There is another rare case that customer will manually add the endpoint to the azure profile. In this case, the trafficManagerBackend will be unaccepted too.
Which issue(s) this PR fixes:
Fixes #
Requirements:
make reviewablefor basic local testHow has this code been tested
added e2e tests, https://github.com/Azure/fleet-networking/actions/runs/15068110856
Special notes for your reviewer