Open
Description
What
Update the DNSRecord API to add a new reason to the "Ready" status condition to indicate that it's not ready because all endpoints have been removed from the provider.
ConditionReasonProviderEndpointsRemoved ConditionReason = "ProviderEndpointsRemoved"
The decision to remove the finalizer from the record during deletion will be based on this new expected status existing after a successful cleanup on the provider.
Why
In order to support multi cluster reconciliation of records we need to be able to signal that a remote record can be cleaned up by the remote clusters dns controller after a primary cluster has successfully dealt with the deletion and removed endpoints from the target provider.
How
- When a record is deleting, the Ready condition should be set to false immediately with the reason endpoints deleting.
- When all the records are verified as removed from the provider, update the condition to: ProviderEndpointsRemoved.
- This should always be the last status update when reconciling a deleting record.
- Update deletion logic to only remove the finalizer when a
Ready=false
status condition exists with the reasonProviderEndpointsRemoved
.
No e2e tests need to be updated for this.