finalize_zone_status

Function finalize_zone_status 

Source
pub async fn finalize_zone_status(
    status_updater: &mut DNSZoneStatusUpdater,
    client: &Client,
    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>,
) -> Result<()>
Expand description

Determine final zone status and apply conditions.

Sets the final condition triple via set_final_zone_conditions and then applies all accumulated status changes to the API server in a single atomic operation.

§Arguments

  • status_updater - Status updater with accumulated changes
  • client - Kubernetes API client
  • zone_name - DNS zone name (e.g., “example.com”)
  • namespace - Kubernetes namespace of the DNSZone resource
  • name - Name of the DNSZone resource
  • primary - Primary configuration outcome (instance + endpoint counts)
  • secondary - Secondary configuration outcome (instance + endpoint counts)
  • expected_primary_count - Expected number of primary instances
  • expected_secondary_count - Expected number of secondary instances
  • records_count - Number of DNS records discovered
  • generation - Metadata generation to set as observed

§Errors

Returns an error if status update fails to apply