Skip to content
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

Enhance the managedCluster deletion process #140

Closed
zhiweiyin318 opened this issue May 19, 2023 · 4 comments
Closed

Enhance the managedCluster deletion process #140

zhiweiyin318 opened this issue May 19, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request Stale

Comments

@zhiweiyin318
Copy link
Member

Describe the enhancement
currently we need to clean up the addons and manifestworks before delete managedCluster manually, so we need to refactor the deletion process of the managedCluster to make it easy to clean up the related resources.

@zhiweiyin318 zhiweiyin318 added the enhancement New feature or request label May 19, 2023
@qiujian16
Copy link
Member

I think we need to consider several different use cases:

  1. after creation of manifestwork/addons, user deletes the managed cluster on the hub.
  2. after creation of manifestwork/addons, user deletes klusterlet on the spoke without any intervention on the hub
  3. after import some clusters and creation of manifestwork/addons, user delete clustermanager on the hub

xuezhaojun pushed a commit to xuezhaojun/OCM that referenced this issue May 25, 2023
Signed-off-by: Wei Liu <liuweixa@redhat.com>
david-martin added a commit to david-martin/multi-cluster-traffic-controller that referenced this issue Jul 19, 2023
When a ManagedCluster is deleted, don't attempt to update the DNSPolicy
straight away.
Instead, reconcile the Gateway first, which will trigger a DNSPolicy
reconcile if there are any changes related to placement changes e.g.
IPAddresses changing.

When a ManagedCluster is deleted, don't wait for the grace period
before deleting a Gateway (via ManifestWork).
Instead, delete the ManifestWork straight away.
Due to a known issue in OCM, open-cluster-management-io/ocm#140
the ManifestWork is not removed after the deletionTimestamp is added
in this sceanrio.
To allow for this, the gateway placement logic will filter out any
ManifestWork resources that have a deletionTimestamp set.
david-martin added a commit to david-martin/multi-cluster-traffic-controller that referenced this issue Jul 19, 2023
When a ManagedCluster is deleted, don't attempt to update the DNSPolicy
straight away.
Instead, reconcile the Gateway first, which will trigger a DNSPolicy
reconcile if there are any changes related to placement changes e.g.
IPAddresses changing.

When a ManagedCluster is deleted, don't wait for the grace period
before deleting a Gateway (via ManifestWork).
Instead, delete the ManifestWork straight away.
Due to a known issue in OCM, open-cluster-management-io/ocm#140
the ManifestWork is not removed after the deletionTimestamp is added
in this sceanrio.
To allow for this, the gateway placement logic will filter out any
ManifestWork resources that have a deletionTimestamp set.
Copy link

github-actions bot commented Nov 8, 2023

This issue is stale because it has been open for 120 days with no activity. After 14 days of inactivity, it will be closed. Remove the stable label to prevent this issue from being closed.

@github-actions github-actions bot added the Stale label Nov 8, 2023
@qiujian16
Copy link
Member

@zhiweiyin318 I think this is completed.

@zhiweiyin318
Copy link
Member Author

added a featureGate ResourceCleanup for the registration on Hub to enable the addon and mainifestworks cleanup after cluster is deleted. default is to disable the featureGate.
the deletion order like this: delete addon firstly, and then delete manifestworks after there is no addons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
Status: Done
Development

No branches or pull requests

2 participants