Skip to content

Commit 4b3a973

Browse files
authored
Merge pull request #12759 from fabriziopandini/show-available-conditions-for-controlplane
🌱 Show Available condition for CP
2 parents 02a78c0 + ff9cb52 commit 4b3a973

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)