Summary
Remove the OwnerReference relationship currently established between Endpoint and BMC resources.
Rationale
With the Endpoint resource now deprecated (see PR #1019 and issue #1018) in favor of modeling endpoint information inline via BMC.spec.access, the existing OwnerReference from BMC to Endpoint (or vice versa) creates an unwanted side effect: Kubernetes garbage collection (GC) will delete the BMC object and all its dependent resources whenever the owning Endpoint is deleted. This is undesirable going forward since Endpoint is being phased out and should not be able to cascade-delete BMC and downstream objects.
Affected areas
- Controllers/reconcilers that set the
OwnerReference between Endpoint and BMC (likely in internal/controller for the BMC/Endpoint reconciliation logic).
- Any related webhook or validation logic in
internal/webhook/v1alpha1.
Acceptance criteria
BMC objects no longer carry an OwnerReference pointing to their associated Endpoint.
- Deleting an
Endpoint no longer triggers garbage collection of the associated BMC and its subsequent objects.
- Existing tests are updated/added to verify that deleting an
Endpoint does not cascade-delete the BMC.
References
Requested by: @afritzler
Summary
Remove the
OwnerReferencerelationship currently established betweenEndpointandBMCresources.Rationale
With the
Endpointresource now deprecated (see PR #1019 and issue #1018) in favor of modeling endpoint information inline viaBMC.spec.access, the existingOwnerReferencefromBMCtoEndpoint(or vice versa) creates an unwanted side effect: Kubernetes garbage collection (GC) will delete theBMCobject and all its dependent resources whenever the owningEndpointis deleted. This is undesirable going forward sinceEndpointis being phased out and should not be able to cascade-deleteBMCand downstream objects.Affected areas
OwnerReferencebetweenEndpointandBMC(likely ininternal/controllerfor the BMC/Endpoint reconciliation logic).internal/webhook/v1alpha1.Acceptance criteria
BMCobjects no longer carry anOwnerReferencepointing to their associatedEndpoint.Endpointno longer triggers garbage collection of the associatedBMCand its subsequent objects.Endpointdoes not cascade-delete theBMC.References
Requested by: @afritzler