Skip to content

Commit ff9cb52

Browse files
Show Available condition for CP
1 parent 9c2eb0a commit ff9cb52

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/util/tree/tree.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,15 @@ func newRowDescriptor(obj ctrlclient.Object) rowDescriptor {
641641
}
642642

643643
if tree.GetObjectContract(obj) == "ControlPlane" {
644+
// if a condition with type Available exist for a CP object, use it instead of ready.
645+
if available := tree.GetAvailableCondition(obj); available != nil {
646+
availableColor, availableStatus, availableAge, availableReason, availableMessage := conditionInfo(*available, true)
647+
v.status = availableColor.Sprintf("%s", availableStatus)
648+
v.reason = availableReason
649+
v.age = availableAge
650+
v.message = availableMessage
651+
}
652+
644653
contractVersion := tree.GetObjectContractVersion(obj)
645654

646655
if current, err := contract.ControlPlane().StatusReplicas().Get(obj); err == nil && current != nil {

0 commit comments

Comments
 (0)