mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Update kubectl to display HPA status conditions
This commit updates `kubectl describe` to display the new HPA status conditions. This should make it easier for users to discern the current state of the HPA.
This commit is contained in:
parent
1334b81d20
commit
53dccdbb43
@ -2627,6 +2627,14 @@ func describeHorizontalPodAutoscaler(hpa *autoscaling.HorizontalPodAutoscaler, e
|
||||
w.Write(LEVEL_0, "failed to check Replication Controller\n")
|
||||
}
|
||||
}
|
||||
if len(hpa.Status.Conditions) > 0 {
|
||||
w.Write(LEVEL_0, "Conditions:\n")
|
||||
w.Write(LEVEL_1, "Type\tStatus\tReason\tMessage\n")
|
||||
w.Write(LEVEL_1, "----\t------\t------\t-------\n")
|
||||
for _, c := range hpa.Status.Conditions {
|
||||
w.Write(LEVEL_1, "%v\t%v\t%v\t%v\n", c.Type, c.Status, c.Reason, c.Message)
|
||||
}
|
||||
}
|
||||
|
||||
if events != nil {
|
||||
DescribeEvents(events, w)
|
||||
|
Loading…
Reference in New Issue
Block a user