-
Notifications
You must be signed in to change notification settings - Fork 193
[WIP] Reconciler changes for PVC and snapshot in supervisor #3275
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
base: master
Are you sure you want to change the base?
[WIP] Reconciler changes for PVC and snapshot in supervisor #3275
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akankshapanse The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
71ea182
to
dfbb0ab
Compare
dfbb0ab
to
330819b
Compare
// This code handles cases where namespace deletion causes guest cluster and its corresponding components | ||
// to be deleted but associated objects on supervisor remain stuck in Terminating state. | ||
func cleanupUnusedPVCsAndSnapshotsFromGuestCluster(ctx context.Context) { | ||
func RemoveCNSFinalizerFromPVCIfTKGClusterDeleted(ctx context.Context, k8sClient clientset.Interface, |
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.
Do we need to wait for full sync cycle to get this finalizer cleared?
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.
We should not call check TKC cluster is deleted or present each time for individual PVC?
Ideally when TKC cluster is deleted, we should catch event and remove finalizers from PVCs.
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.
Do we need to wait for full sync cycle to get this finalizer cleared?
No, the reconciler should catch the PVC/Snapshot delete event and verify that guest cluster is also gone, then remove the finalizer. Full sync will add safety logic to handle the case in case event is missed or any errors encounted by reconciler
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Testing done:
A PR must be marked "[WIP]", if no test result is provided. A WIP PR won't be reviewed, nor merged.
The requester can determine a sufficient test, e.g. build for a cosmetic change, E2E test in a predeployed setup, etc.
For new features, new tests should be done, in addition to regression tests.
If jtest is used to trigger precheckin tests, paste the result after jtest completes and remove [WIP] in the PR subject.
The review cycle will start, only after "[WIP]" is removed from the PR subject.
Special notes for your reviewer:
Release note: