add_dnszone_to_secondaries

Function add_dnszone_to_secondaries 

Source
pub async fn add_dnszone_to_secondaries(
    client: Client,
    dnszone: DNSZone,
    zone_manager: &Bind9Manager,
    primary_ips: &[String],
) -> Result<usize>
Expand description

Adds a DNS zone to all secondary instances in the cluster with primaries configured.

Creates secondary zones on all secondary instances, configuring them to transfer from the provided primary server IPs. If a zone already exists on a secondary, it checks if the primaries list matches and updates it if necessary.

§Arguments

  • client - Kubernetes API client
  • dnszone - The DNSZone resource
  • zone_manager - BIND9 manager for adding zone
  • primary_ips - List of primary server IPs to configure in the primaries field

§Returns

  • Ok(usize) - Number of secondary endpoints successfully configured
  • Err(_) - If zone addition failed

§Errors

Returns an error if BIND9 zone addition fails on any secondary instance.