reconcile_instance_zones

Function reconcile_instance_zones 

Source
pub async fn reconcile_instance_zones(
    client: &Client,
    stores: &Stores,
    instance: &Bind9Instance,
) -> Result<()>
Expand description

Reconciles the zones list for a Bind9Instance based on current DNSZone state.

This function performs status-only updates by:

  1. Querying all DNSZones from the reflector store (in-memory, no API call)
  2. Filtering to zones that have this instance in their status.bind9Instances
  3. Patching the instance’s status.zones field if changed

§Arguments

  • client - Kubernetes API client for status patching
  • stores - Reflector stores containing all DNSZones
  • instance - The Bind9Instance to reconcile zones for

§Returns

  • Ok(()) - If zone reconciliation succeeded (or no change needed)

§Errors

Returns an error if the Kubernetes API status patch fails.