Skip to content

Use controller-runtime utility package to set and remove ownerRefs. #1722

@guettli

Description

@guettli

/kind feature

Currently, the code does not use controller-runtime utils to set ownerRefs.

The code should use controllerutil to set and remove OwnerReferences.

Example:

// setOwnerRef adds an owner reference of this HetznerBareMetalMachine.
func (s *Service) setOwnerRef(refList []metav1.OwnerReference) []metav1.OwnerReference {
	return setOwnerRefInList(refList, s.scope.BareMetalMachine.TypeMeta, s.scope.BareMetalMachine.ObjectMeta)
}

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