Skip to content

Commit

Permalink
Fix replica counters for cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziopandini committed Nov 15, 2024
1 parent 36f08e0 commit 5955711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/describe_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ func newV1beta2RowDescriptor(obj ctrlclient.Object) v1beta2RowDescriptor {
w = &clusterv1.WorkersStatus{}
}
if cp.DesiredReplicas != nil || w.DesiredReplicas != nil || cp.Replicas != nil || w.Replicas != nil {
v.replicas = fmt.Sprintf("%d/%d", ptr.Deref(cp.DesiredReplicas, 0)+ptr.Deref(w.DesiredReplicas, 0), ptr.Deref(cp.Replicas, 0)+ptr.Deref(w.Replicas, 0))
v.replicas = fmt.Sprintf("%d/%d", ptr.Deref(cp.Replicas, 0)+ptr.Deref(w.Replicas, 0), ptr.Deref(cp.DesiredReplicas, 0)+ptr.Deref(w.DesiredReplicas, 0))
}
if cp.AvailableReplicas != nil || w.AvailableReplicas != nil {
v.availableCounters = fmt.Sprintf("%d", ptr.Deref(cp.AvailableReplicas, 0)+ptr.Deref(w.AvailableReplicas, 0))
Expand Down

0 comments on commit 5955711

Please sign in to comment.