Skip to content

Question: Best practice for cleaning up resources from a single cluster with stopMatchingBehavior: LeavePolicies? #674

@kahirokunn

Description

@kahirokunn

Hello ✋

I came across an interesting scenario while testing ClusterProfile behavior and wanted to ask about the recommended approach.

Scenario

During my testing with a ClusterProfile that has stopMatchingBehavior: LeavePolicies, I accidentally matched it to a cluster where I didn't intend to deploy. This got me thinking about the best way to clean up resources from just that specific cluster without affecting other clusters where the profile is correctly deployed.

The challenge I noticed

  1. Removing the label from the cluster: The ClusterSummary gets deleted, but resources remain in the cluster (which is expected behavior with LeavePolicies)
  2. Temporarily changing the ClusterProfile's stopMatchingBehavior: This could potentially impact all other clusters where the profile is correctly deployed

Question

Is there a recommended procedure or best practice for this kind of situation? I'm curious if there's a clean way to remove resources from a single mismatched cluster while keeping the stopMatchingBehavior: LeavePolicies setting intact for the ClusterProfile.

Thanks for your help! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions