pub async fn discover_and_update_records(
client: &Client,
dnszone: &DNSZone,
status_updater: &mut DNSZoneStatusUpdater,
stores: &Stores,
) -> Result<(Vec<RecordReferenceWithTimestamp>, usize)>Expand description
Discover and update DNSZone status with DNS records.
This wrapper function orchestrates record discovery and status updates:
- Sets “Progressing” status condition
- Calls
reconcile_zone_records()to discover records - Updates DNSZone status with discovered records
§Arguments
client- Kubernetes API clientdnszone- The DNSZone resource being reconciledstatus_updater- Status updater for setting conditions and recordsstores- Context stores for resolving instances and creatingBind9Managers
§Returns
Tuple of (record_refs, records_count) - the discovered record references and their count
§Errors
Returns an error if record discovery fails (e.g., a transient record list
failure). The existing status.records list is left untouched in that case
so the watch mapper keeps working until discovery succeeds again; wiping it
on a transient error would orphan the zone’s records.