kubernetes-client icon indicating copy to clipboard operation
kubernetes-client copied to clipboard

Default owner reference blockOwnerDeletion to true

Open shawkins opened this issue 1 year ago • 5 comments

Is your enhancement related to a problem? Please describe

Relates to https://github.com/operator-framework/java-operator-sdk/issues/2318 - the fabric8 logic is currently defaulting to null. the operator sdk is ok if the default behavior changes in fabric8. They don't expect that behavior will need to be configurable.

Describe the solution you'd like

For the fabric8 ownerReference creation method to default blockOwnerDeletion to true - that matches the default expected behavior of kubernetes.

Describe alternatives you've considered

No response

Additional context

No response

shawkins avatar Mar 26 '24 15:03 shawkins

@shawkins : Is this issue related to Kubernetes Model? Or do we want to accommodate null value for blockOwnerDeletion while handing it in KubernetesClient?

rohanKanojia avatar Apr 02 '24 09:04 rohanKanojia

If some will need this to be configurable, we can just override it on our side. But having this defaulted to true is probably the expected way to go IMO.

csviri avatar Apr 02 '24 10:04 csviri

Is this issue related to Kubernetes Model? Or do we want to accommodate null value for blockOwnerDeletion while handing it in KubernetesClient?

@rohanKanojia This is referring to the HasMetadata.addOwnerReference helper method, it's defaulting to null but true would be a better choice.

shawkins avatar Apr 02 '24 10:04 shawkins

Would this be a breaking change? i.e. can we add this in 6.13, seems like low hanging fruit.

manusa avatar Apr 25 '24 14:04 manusa

Strictly speaking yes, but practially speaking no - it's what users should want by default.

shawkins avatar Apr 25 '24 14:04 shawkins

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

stale[bot] avatar Aug 03 '24 02:08 stale[bot]