discover_and_update_records

Function discover_and_update_records 

Source
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:

  1. Sets “Progressing” status condition
  2. Calls reconcile_zone_records() to discover records
  3. Updates DNSZone status with discovered records

§Arguments

  • client - Kubernetes API client
  • dnszone - The DNSZone resource being reconciled
  • status_updater - Status updater for setting conditions and records
  • stores - Context stores for resolving instances and creating Bind9Managers

§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.