diff --git a/pkg/printers/internalversion/describe.go b/pkg/printers/internalversion/describe.go index c96da7843482e..40f6a4e03c8b5 100644 --- a/pkg/printers/internalversion/describe.go +++ b/pkg/printers/internalversion/describe.go @@ -2830,13 +2830,13 @@ func describeHorizontalPodAutoscaler(hpa *autoscaling.HorizontalPodAutoscaler, e hpa.Status.CurrentMetrics[i].External.CurrentAverageValue != nil { current = hpa.Status.CurrentMetrics[i].External.CurrentAverageValue.String() } - w.Write(LEVEL_1, "%q:\t%s / %s\n", metric.External.MetricName, current, metric.External.TargetAverageValue.String()) + w.Write(LEVEL_1, "%q (target average value):\t%s / %s\n", metric.External.MetricName, current, metric.External.TargetAverageValue.String()) } else { current := "" if len(hpa.Status.CurrentMetrics) > i && hpa.Status.CurrentMetrics[i].External != nil { current = hpa.Status.CurrentMetrics[i].External.CurrentValue.String() } - w.Write(LEVEL_1, "%q:\t%s / %s\n", metric.External.MetricName, current, metric.External.TargetValue.String()) + w.Write(LEVEL_1, "%q (target value):\t%s / %s\n", metric.External.MetricName, current, metric.External.TargetValue.String()) } case autoscaling.PodsMetricSourceType: diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index 197a8ddbdc874..56feeaff3ae57 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -1497,7 +1497,7 @@ func formatHPAMetrics(specs []autoscaling.MetricSpec, statuses []autoscaling.Met if len(statuses) > i && statuses[i].External != nil && statuses[i].External.CurrentAverageValue != nil { current = statuses[i].External.CurrentAverageValue.String() } - list = append(list, fmt.Sprintf("%s/%s", current, spec.External.TargetAverageValue.String())) + list = append(list, fmt.Sprintf("%s/%s (avg)", current, spec.External.TargetAverageValue.String())) } else { current := "" if len(statuses) > i && statuses[i].External != nil { diff --git a/pkg/printers/internalversion/printers_test.go b/pkg/printers/internalversion/printers_test.go index 1f6f16b5135af..474e599a3ea2c 100644 --- a/pkg/printers/internalversion/printers_test.go +++ b/pkg/printers/internalversion/printers_test.go @@ -2200,7 +2200,7 @@ func TestPrintHPA(t *testing.T) { DesiredReplicas: 5, }, }, - "some-hpa\tReplicationController/some-rc\t/100m\t2\t10\t4\t\n", + "some-hpa\tReplicationController/some-rc\t/100m (avg)\t2\t10\t4\t\n", }, // external source type, target average value { @@ -2247,7 +2247,7 @@ func TestPrintHPA(t *testing.T) { }, }, }, - "some-hpa\tReplicationController/some-rc\t50m/100m\t2\t10\t4\t\n", + "some-hpa\tReplicationController/some-rc\t50m/100m (avg)\t2\t10\t4\t\n", }, // external source type, target value (no current) {