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

Extend controllerhelpers.Prune with a safety check on objects without a controllerRef #2375

Open
mflendrich opened this issue Feb 4, 2025 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/from-migration Indicates that this issue is a copy of a corresponding issue mentioned in the description. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@mflendrich
Copy link
Collaborator

Issue originally authored by tnozicka as #2010

Controllers should only act on objects that are owned by them through an ownerRef, or by having a label selector in cases where there is no viable owner. Maybe we can add a top level object in the future so all can have a parent, even the ones that are shared.

Generally, the ownership check is done when claiming the objects before the sync loops are ran. As an additional safety check, @zimnx proposed to have an explicit flag allowMissingControllerRef for controllerhelpers.Prune that would make sure objects without controllerRef would need it to be explicitly set. Although this wouldn't check the actual owner again.

@mflendrich mflendrich added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Feb 4, 2025
@mflendrich mflendrich added the lifecycle/from-migration Indicates that this issue is a copy of a corresponding issue mentioned in the description. label Feb 4, 2025
@mflendrich mflendrich added kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/from-migration Indicates that this issue is a copy of a corresponding issue mentioned in the description. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

1 participant