expected_cluster_namespaces

Function expected_cluster_namespaces 

Source
pub fn expected_cluster_namespaces(
    instances: &[Bind9Instance],
    provider_name: &str,
    target_namespace: &str,
) -> HashSet<String>
Expand description

Computes the namespaces where a managed Bind9Cluster is expected to exist.

This is the single source of truth shared by reconcile_namespace_clusters (which creates the managed clusters) and detect_cluster_drift (which verifies them), so the two can never diverge.

The expected set is every namespace containing a Bind9Instance that references the provider; when no instance references it, the provider’s target namespace is used as a fallback.

§Arguments

  • instances - All Bind9Instance resources in the cluster
  • provider_name - Name of the ClusterBind9Provider
  • target_namespace - Fallback namespace when no instances reference the provider