Skip to content

clusterset delete policy - #53

Open
ldpliu wants to merge 1 commit into
open-cluster-management-io:mainfrom
ldpliu:clusterset-delete
Open

clusterset delete policy#53
ldpliu wants to merge 1 commit into
open-cluster-management-io:mainfrom
ldpliu:clusterset-delete

Conversation

@ldpliu

@ldpliu ldpliu commented Apr 22, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: ldpliu daliu@redhat.com

Signed-off-by: ldpliu <daliu@redhat.com>
@openshift-ci
openshift-ci Bot requested review from deads2k and mdelder April 22, 2022 07:38
@openshift-ci

openshift-ci Bot commented Apr 22, 2022

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ldpliu
To complete the pull request process, please assign qiujian16 after the PR has been reviewed.
You can assign the PR to them by writing /assign @qiujian16 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ldpliu

ldpliu commented Apr 22, 2022

Copy link
Copy Markdown
Contributor Author

/assign @qiujian16 @elgnay

@qiujian16 qiujian16 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might consider whether a clusterset owns a cluster, instead of a deletion policy

The proposed work enhances the managedClusterSet API to handle managedClusterSet Delete policy.

## Motivation
Currently, when we add a cluster to a clusterset, we will add a label `cluster.open-cluster-management.io/clusterset:<Clusterset Name>` to the cluster. But when the clusterset is deleted, this label will not be removed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please clarify why this is a problem

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this need more clarification on use cases.


## Proposal Detail
Actually, we always use clusterset as a group of clusters. So when deleting a clusterset, there are some options for the delete policy.
1. When clusterset deleted, delete the clusterset labels in managedClusters.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think this is an unnatural behavior to remove a thing not managed by it.


```
### Details
Notes: the `DeletePolicy` only works for the `ClusterSelector.SelectorType` is `LegacyClusterSetLabel`. It means the clusterset uses the label `cluster.open-cluster-management.io/clusterset:<Clusterset Name>` to select target clusters. So In the doc, we only cover the clusterset which `ClusterSelector.SelectorType` is `LegacyClusterSetLabel`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reason?

@ocm-bot

ocm-bot commented Jul 20, 2026

Copy link
Copy Markdown

This issue/PR is marked stale and will be closed in 30 days unless there is new activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants