Use background cascading deletion of DynamicPVC #1474
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
follows fabric8io/kubernetes-client#2178 to use proper background cascading deletion preventing clients that cannot have access to finalizer to fail to create a pvc
This PR comes after hours of researching an issue on openshift https://access.redhat.com/solutions/4577161
the fabric8io dependancy changed the default cascading deletion to "background" 3 years ago.
In https://kubernetes.io/docs/concepts/architecture/garbage-collection/#cascading-deletion , we can see that blockOwnerDeletion=true is only used in foreground cascading deletion
But setting blockOwnerDeletion=true cause an issue with restricted Openshift environments where the serviceaccount cannot have access to finalizers
Setting it to false should default to use proper background cascading deletion
Testing not done
As I'm not a java developer, I cannot say that I know how to test or build the plugin. But the change follows the spec of the fabric8io library and of the kubernetes specification.
I would be more than willing to build and test it myself, but I would only have time to follow only simple steps
Submitter checklist