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

Support stale object deletion for multi-instance CRs #690

Open
adrianchiris opened this issue Nov 22, 2023 · 0 comments
Open

Support stale object deletion for multi-instance CRs #690

adrianchiris opened this issue Nov 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@adrianchiris
Copy link
Collaborator

Today, stale state object deletion mechanism works only if a single CR instance exists.

e.g it will work for NicClusterPolicy CR where a state(s) (and its objects) exists at most once in the cluster
It will not work for CRs such as MacVlanNetwork where multiple instances exists each will instantiate their own state(s) (and its objects)

we should add a check for owner ref of the owning CR in the state generated object and only delete stale objects which are owned by the specific CR instance during reconcile.

Note: today handling of stale reosurces of a CR is not performed for *Network CRs as they dont contain multiple states.
the deletion of the CR will remove its related resources, which is for now good enough.

however for consistency and future proof, we would like to support deleting stale resources for multi-instance CRs.

Work Item:
add check in stateSkel.deleteStateRelatedObjects for owned object before deleting.

@adrianchiris adrianchiris added the enhancement New feature or request label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant