pub async fn for_each_secondary_endpoint<F, Fut>(
client: &Client,
namespace: &str,
cluster_ref: &str,
is_cluster_provider: bool,
with_rndc_key: bool,
port_name: &str,
operation: F,
) -> Result<(Option<String>, usize)>Expand description
Update lastReconciledAt timestamp for a zone in Bind9Instance.status.selectedZones[].
This function implements the critical Phase 2 completion step: after successfully configuring a zone on an instance, we update the instance’s status to signal that the zone is now reconciled and doesn’t need reconfiguration on future reconciliations.
This prevents infinite reconciliation loops by ensuring the DNSZone watch mapper
only triggers reconciliation when lastReconciledAt == None.
§Arguments
client- Kubernetes API clientinstance_name- Name of theBind9Instanceinstance_namespace- Namespace of theBind9Instancezone_name- Name of theDNSZoneresourcezone_namespace- Namespace of theDNSZoneresource
Execute an operation on all SECONDARY endpoints for a cluster.
Similar to for_each_primary_endpoint, but operates on SECONDARY instances.
Useful for triggering zone transfers or other secondary-specific operations.
§Arguments
client- Kubernetes API clientnamespace- Namespace to search for instancescluster_ref- Cluster reference nameis_cluster_provider- Whether this is a cluster provider (cluster-scoped)with_rndc_key- Whether to load and pass RNDC keys for each instanceport_name- Port name to use for endpoints (e.g., “rndc-api”, “dns-tcp”)operation- Async closure to execute for each endpoint
§Returns
Ok((first_endpoint, total_endpoints))- First endpoint found and total count
§Errors
Returns an error if:
- Failed to find secondary pods
- Failed to load RNDC keys
- Failed to get service endpoints
- The operation closure returns an error for any endpoint