@@ -38,7 +38,7 @@ const (
3838 reasonReadError = "ReadError" // Kubernetes API read failed
3939)
4040
41- // computeReadySummary derives the Ready summary condition from the four managed conditions .
41+ // computeReadySummary derives the Ready summary condition from the four managed inputs .
4242// Priority: any False beats any Unknown beats all True.
4343// The reason and message are taken from the first condition that determines the outcome,
4444// in dependency order (Preflight -> HelmInstalled -> DriverReady -> ValidatorPassed).
@@ -88,25 +88,3 @@ func computeReadySummary(conditions []metav1.Condition, generation int64) metav1
8888 ObservedGeneration : generation ,
8989 }
9090}
91-
92- // setCondition writes a condition entry, passing status, reason, and message directly so
93- // callers retain full control over the tri-state (True / False / Unknown).
94- func setCondition (conditions * []metav1.Condition , condType string , status metav1.ConditionStatus , reason , message string , generation int64 ) {
95- apimeta .SetStatusCondition (conditions , metav1.Condition {
96- Type : condType ,
97- Status : status ,
98- Reason : reason ,
99- Message : message ,
100- ObservedGeneration : generation ,
101- })
102- }
103-
104- // conditionMatches returns true when the named condition already carries the given status, reason, and message.
105- // Used to skip a no-op status patch when nothing changed.
106- func conditionMatches (conditions []metav1.Condition , condType string , status metav1.ConditionStatus , reason , message string ) bool {
107- c := apimeta .FindStatusCondition (conditions , condType )
108- if c == nil {
109- return false
110- }
111- return c .Status == status && c .Reason == reason && c .Message == message
112- }
0 commit comments