pub async fn reconcile_zone_records(
client: Client,
dnszone: DNSZone,
) -> Result<Vec<RecordReferenceWithTimestamp>>Expand description
Reconciles DNS records for a zone by discovering records that match the zone’s label selectors.
Event-Driven Architecture: This function implements the core of the zone/record ownership model:
- Discovers records matching the zone’s
recordsFromlabel selectors - Tags matched records by setting
status.zoneRef(triggers record reconciliation via watches) - Untags previously matched records by clearing
status.zoneRef(stops record reconciliation) - Returns references to currently matched records for
DNSZone.status.recordstracking
Record reconcilers watch status.zoneRef to determine which zone they belong to.
When status.zoneRef is set, the record is reconciled to BIND9.
When status.zoneRef is cleared, the record reconciler marks it as "NotSelected".
§Arguments
client- Kubernetes API client for querying DNS recordsdnszone- TheDNSZoneresource with label selectors
§Returns
Ok(Vec<RecordReference>)- List of currently matched DNS recordsErr(_)- If record discovery or tagging fails
§Errors
Returns an error if Kubernetes API operations fail.