-
Notifications
You must be signed in to change notification settings - Fork 19
feat: handle MC force delete #192
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #192 +/- ##
==========================================
+ Coverage 78.61% 79.10% +0.49%
==========================================
Files 22 24 +2
Lines 2899 2288 -611
==========================================
- Hits 2279 1810 -469
+ Misses 490 349 -141
+ Partials 130 129 -1 ☔ View full report in Codecov by Sentry. |
|
For these resources in the fleet-member namespaces there are controllers running on the hub cluster which clean up the finalizers when a delete is issued on the resources so we can ignore these resources when MC needs to be force deleted EndpointSliceExport - https://github.com/Azure/fleet-networking/blob/main/pkg/controllers/hub/endpointsliceexport/controller.go#L334 InternalServiceImport - https://github.com/Azure/fleet-networking/blob/main/pkg/controllers/hub/internalserviceimport/controller.go#L264 InternalServiceExport - https://github.com/Azure/fleet-networking/blob/main/pkg/controllers/hub/internalserviceexport/controller.go#L119 |
pkg/controllers/hub/membercluster/controlller_integration_test.go
Outdated
Show resolved
Hide resolved
pkg/controllers/hub/membercluster/controlller_integration_test.go
Outdated
Show resolved
Hide resolved
pkg/controllers/hub/membercluster/controlller_integration_test.go
Outdated
Show resolved
Hide resolved
|
Based on re-sync period configured objects are re-listed and OnUpdate is called, Informer interface with ResourceEventHandler: https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/cache/cache.go#L113 We might need to set a re-sync period for this particular controller to account for this. |
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Requirements:
make reviewablefor basic local testHow has this code been tested
Special notes for your reviewer