DeletionTimestamp and Finalizer support in Mock server #3805
Labels
component/kubernetes-server-mock
Deals with the kubernetes-server-mock directory mainly
enhancement
status/never-stale
Milestone
Is your enhancement related to a problem? Please describe
I'm writing an operator and would like to test how it behaves when deleting a resource. In CRUD mode, when a resource is deleted, it is remove even if finalizers is not empty.
Describe the solution you'd like
I expect delete to update the resource with a deletionTimestamp if finalizers collection is not empty. When the operator will remove its finalizer and update the CR, if the finalizers collection is empty, the resource should be deleted.
I should be able to wait for the resource to be deleted (wait while get CR is not null) and assert the operator does its cleanup job.
Describe alternatives you've considered
I tried to update the resource with edit to set a deletionTimestamp but is seems to be not saved.
what works is to replace the CR.
Additional context
No response
The text was updated successfully, but these errors were encountered: