pub async fn cleanup_stale_records(
client: &Client,
dnszone: &DNSZone,
status_updater: &mut DNSZoneStatusUpdater,
bind9_instances_store: &Store<Bind9Instance>,
) -> Result<usize>Expand description
Clean up stale records from zone status.
Iterates through records in zone status and removes any that no longer exist in the Kubernetes API. Also performs self-healing by deleting orphaned records from BIND9 if they were missed by finalizers.
§Arguments
client- Kubernetes clientdnszone- The DNSZone resource being reconciledstatus_updater- Status updater for modifying zone statusbind9_instances_store- Reflector store for querying Bind9Instance resources
§Returns
Number of records removed from status
§Errors
Returns an error if API calls fail critically (non-NotFound errors).