-
Notifications
You must be signed in to change notification settings - Fork 107
🌱 refator gc and move rbac deletion to cluster controller #831
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
🌱 refator gc and move rbac deletion to cluster controller #831
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #831 +/- ##
==========================================
- Coverage 63.74% 63.69% -0.05%
==========================================
Files 194 193 -1
Lines 18888 18840 -48
==========================================
- Hits 12040 12001 -39
- Misses 5859 5861 +2
+ Partials 989 978 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
45cbb5a
to
a65f7d5
Compare
/assign @qiujian16 |
} | ||
} | ||
|
||
requeue, gcErr := r.gcResourcesController.reconcile(ctx, copyCluster, clusterName) |
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.
since we already have the requeue error type defined. We could return requeue error from the reconciler.
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.
done
@@ -105,8 +130,21 @@ func (c *managedClusterController) sync(ctx context.Context, syncCtx factory.Syn | |||
newManagedCluster := managedCluster.DeepCopy() | |||
|
|||
if !managedCluster.DeletionTimestamp.IsZero() { | |||
// the cleanup job is moved to gc controller | |||
return nil | |||
requeue, err := c.removeClusterRbac(ctx, managedClusterName, true) |
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.
I think we should run cleanup in approver at first, then removeClusterRBAC. Also use requeu error.
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.
done
a98255f
to
269ffd4
Compare
269ffd4
to
87ae05a
Compare
Signed-off-by: Zhiwei Yin <[email protected]>
87ae05a
to
01946bd
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, zhiweiyin318 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 |
b94d7da
into
open-cluster-management-io:main
…-management-io#831) Signed-off-by: Zhiwei Yin <[email protected]>
…-management-io#831) Signed-off-by: Zhiwei Yin <[email protected]>
…-management-io#831) (#245) Signed-off-by: Zhiwei Yin <[email protected]>
…-management-io#831) (#246) Signed-off-by: Zhiwei Yin <[email protected]>
Summary
Related issue(s)
Fixes #