pub fn set_final_zone_conditions(
status_updater: &mut DNSZoneStatusUpdater,
zone_name: &str,
namespace: &str,
name: &str,
primary: ZoneConfigOutcome,
secondary: ZoneConfigOutcome,
expected_primary_count: usize,
expected_secondary_count: usize,
records_count: usize,
generation: Option<i64>,
)Expand description
Set the final zone conditions in memory (no API call).
This function calculates the final Ready/Degraded/Progressing status based on:
- Whether any degraded conditions were set during reconciliation
- Whether all expected INSTANCES were successfully configured (comparing instance counts with instance counts - never endpoint counts, which would mask partial pod failures)
- Number of records discovered
The conditions always converge to a consistent triple:
- Success:
Ready=True,Degraded=False,Progressing=False - Failure/partial:
Ready=False,Degraded=True,Progressing=False
§Arguments
status_updater- Status updater with accumulated changeszone_name- DNS zone name (e.g., “example.com”)namespace- Kubernetes namespace of the DNSZone resourcename- Name of the DNSZone resourceprimary- Primary configuration outcome (instance + endpoint counts)secondary- Secondary configuration outcome (instance + endpoint counts)expected_primary_count- Expected number of primary instancesexpected_secondary_count- Expected number of secondary instancesrecords_count- Number of DNS records discoveredgeneration- Metadata generation to set as observed