cluster_status_changed

Function cluster_status_changed 

Source
pub fn cluster_status_changed(
    current: Option<&Bind9ClusterStatus>,
    conditions: &[Condition],
    instance_count: i32,
    ready_instances: i32,
    instances: &[String],
    generation: Option<i64>,
) -> bool
Expand description

Determines whether the Bind9Cluster status patch is needed.

Compares the current status against the values about to be written. The patch is needed if any of the following changed:

  • instance_count, ready_instances, or the instance name list
  • observed_generation (so spec edits that don’t change counts/conditions still advance observedGeneration and stop perpetual re-reconciliation)
  • Any condition’s type, status, reason, or message

§Arguments

  • current - The status currently stored on the resource (if any)
  • conditions - New conditions about to be written
  • instance_count - New total instance count
  • ready_instances - New ready instance count
  • instances - New instance name list
  • generation - The metadata.generation about to be written as observed_generation

§Returns

true if the status patch should be applied, false if it can be skipped.