pub fn calculate_cluster_status(
instances: &[Bind9Instance],
namespace: &str,
name: &str,
) -> (i32, i32, Vec<String>, Vec<Condition>)Expand description
Calculate cluster status from instance health.
Analyzes the list of instances to determine cluster readiness.
Creates both an encompassing Ready condition and individual conditions
for each instance.
§Arguments
instances- List ofBind9Instanceresources for the clusternamespace- Cluster namespace (for logging)name- Cluster name (for logging)
§Returns
Tuple of:
instance_count- Total number of instancesready_instances- Number of ready instancesinstance_names- Names of all instancesconditions- Vector of status conditions (Ready + per-instance)