pub fn update_condition_in_memory(
conditions: &mut Vec<Condition>,
condition_type: &str,
status: &str,
reason: &str,
message: &str,
)Expand description
Update or add a condition in a mutable conditions list (in-memory, no API call).
This function modifies the conditions list in-place by either updating an existing
condition or adding a new one. It preserves the lastTransitionTime if the status
hasn’t changed, or sets a new timestamp if it has.
Important: This function does NOT make any Kubernetes API calls. It only modifies
the in-memory conditions list. You must call patch_status() separately to persist
the changes.
§Arguments
conditions- Mutable reference to the conditions listcondition_type- The type of condition (e.g., “Ready”, “Progressing”)status- The status: “True”, “False”, or “Unknown”reason- A programmatic identifier inCamelCasemessage- A human-readable explanation
§Example
ⓘ
use bindy::reconcilers::status::update_condition_in_memory;
use bindy::crd::DNSZoneStatus;
let mut status = DNSZoneStatus::default();
update_condition_in_memory(
&mut status.conditions,
"Ready",
"True",
"ZoneConfigured",
"Zone configured on 3 servers"
);