mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 22:20:51 +00:00
Merge pull request #56331 from shiywang/fix_indent
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove spaces from kubectl describe hpa Fixes comment left here: https://github.com/kubernetes/kubernetes/pull/36033#discussion_r108020701 @kubernetes/sig-cli-pr-reviews @DirectXMan12 ```release-note remove spaces from kubectl describe hpa ```
This commit is contained in:
@@ -1487,20 +1487,20 @@ func formatHPAMetrics(specs []autoscaling.MetricSpec, statuses []autoscaling.Met
|
||||
if len(statuses) > i && statuses[i].Pods != nil {
|
||||
current = statuses[i].Pods.CurrentAverageValue.String()
|
||||
}
|
||||
list = append(list, fmt.Sprintf("%s / %s", current, spec.Pods.TargetAverageValue.String()))
|
||||
list = append(list, fmt.Sprintf("%s/%s", current, spec.Pods.TargetAverageValue.String()))
|
||||
case autoscaling.ObjectMetricSourceType:
|
||||
current := "<unknown>"
|
||||
if len(statuses) > i && statuses[i].Object != nil {
|
||||
current = statuses[i].Object.CurrentValue.String()
|
||||
}
|
||||
list = append(list, fmt.Sprintf("%s / %s", current, spec.Object.TargetValue.String()))
|
||||
list = append(list, fmt.Sprintf("%s/%s", current, spec.Object.TargetValue.String()))
|
||||
case autoscaling.ResourceMetricSourceType:
|
||||
if spec.Resource.TargetAverageValue != nil {
|
||||
current := "<unknown>"
|
||||
if len(statuses) > i && statuses[i].Resource != nil {
|
||||
current = statuses[i].Resource.CurrentAverageValue.String()
|
||||
}
|
||||
list = append(list, fmt.Sprintf("%s / %s", current, spec.Resource.TargetAverageValue.String()))
|
||||
list = append(list, fmt.Sprintf("%s/%s", current, spec.Resource.TargetAverageValue.String()))
|
||||
} else {
|
||||
current := "<unknown>"
|
||||
if len(statuses) > i && statuses[i].Resource != nil && statuses[i].Resource.CurrentAverageUtilization != nil {
|
||||
@@ -1511,7 +1511,7 @@ func formatHPAMetrics(specs []autoscaling.MetricSpec, statuses []autoscaling.Met
|
||||
if spec.Resource.TargetAverageUtilization != nil {
|
||||
target = fmt.Sprintf("%d%%", *spec.Resource.TargetAverageUtilization)
|
||||
}
|
||||
list = append(list, fmt.Sprintf("%s / %s", current, target))
|
||||
list = append(list, fmt.Sprintf("%s/%s", current, target))
|
||||
}
|
||||
default:
|
||||
list = append(list, "<unknown type>")
|
||||
|
Reference in New Issue
Block a user