instance_status_changed

Function instance_status_changed 

Source
pub fn instance_status_changed(
    current: Option<&Bind9InstanceStatus>,
    conditions: &[Condition],
    cluster_ref: Option<&ClusterReference>,
    zones: &[ZoneReference],
    generation: Option<i64>,
    observed_parent_generation: Option<i64>,
) -> bool
Expand description

Determines whether the Bind9Instance 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:

  • cluster_ref or the zones list
  • observed_generation (so spec edits that don’t change conditions still advance observedGeneration and stop perpetual re-reconciliation)
  • observed_parent_generation (so parent cluster config changes are recorded once applied)
  • 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
  • cluster_ref - New cluster reference about to be written
  • zones - Zones list about to be written (preserved from current status)
  • generation - The metadata.generation about to be written as observed_generation
  • observed_parent_generation - The parent cluster generation about to be written

§Returns

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