Proposal: Include Condition Reason When Merging Conditions in CAPI v1beta2 #11892
Closed
LingyanCao
started this conversation in
General
Replies: 1 comment
-
Raised a new issue #11899 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In CAPI v1beta2, the top-level Cluster resource aggregates unexpected condition statuses from underlying resources. For example, the ControlPlaneMachinesReady condition consolidates the Ready condition of all control plane machines, highlighting any unready machines.
However, when merging condition messages, the Reason field is not included by default. This behavior is defined in the merge strategy implementation.
This omission presents a challenge when diagnosing issues. If an infrastructure provider reports an error via a condition in infra machine resource, only the condition message propagates to the top-level Cluster resource. Consequently, when building an operator that interacts solely with the Cluster resource, we must rely on message parsing and pattern matching to infer the root cause, which is inefficient and error-prone.
By preserving both the Reason and Message fields during condition merging, we can retain structured and concise error information. The short Reason string provides a standardized way to identify failure categories, improving debugging and automation.
Would the community consider updating the condition merging strategy to retain the Reason field along with the Message?
Beta Was this translation helpful? Give feedback.
All reactions