Skip to content

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

Open
@mflendrich

Description

@mflendrich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/from-migrationIndicates that this issue is a copy of a corresponding issue mentioned in the description.priority/backlogHigher priority than priority/awaiting-more-evidence.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions