cluster_status_needs_update

Function cluster_status_needs_update 

Source
pub fn cluster_status_needs_update(
    current_status: Option<&Bind9ClusterStatus>,
    new_status: &Bind9ClusterStatus,
) -> bool
Expand description

Determines whether the ClusterBind9Provider status patch is needed.

Compares the current status against the newly calculated status. The patch is needed if any of the following changed:

  • instance_count or ready_instances
  • observed_generation (so spec edits that don’t change counts/conditions still advance observedGeneration and stop perpetual re-reconciliation)
  • The first (encompassing) condition’s type, status, or message

§Arguments

  • current_status - The status currently stored on the resource (if any)
  • new_status - The freshly calculated status about to be written

§Returns

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