diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index 0b8d1b1921..26f7b6d74b 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -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 := "" 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 := "" 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 := "" 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, "") diff --git a/pkg/printers/internalversion/printers_test.go b/pkg/printers/internalversion/printers_test.go index 0f2c530f86..8b512251fe 100644 --- a/pkg/printers/internalversion/printers_test.go +++ b/pkg/printers/internalversion/printers_test.go @@ -2194,7 +2194,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\t2\t10\t4\t\n", }, // pods source type { @@ -2231,7 +2231,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\t2\t10\t4\t\n", }, // object source type (no current) { @@ -2263,7 +2263,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\t2\t10\t4\t\n", }, // object source type { @@ -2308,7 +2308,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\t2\t10\t4\t\n", }, // resource source type, targetVal (no current) { @@ -2336,7 +2336,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\t2\t10\t4\t\n", }, // resource source type, targetVal { @@ -2373,7 +2373,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\t2\t10\t4\t\n", }, // resource source type, targetUtil (no current) { @@ -2401,7 +2401,7 @@ func TestPrintHPA(t *testing.T) { DesiredReplicas: 5, }, }, - "some-hpa\tReplicationController/some-rc\t / 80%\t2\t10\t4\t\n", + "some-hpa\tReplicationController/some-rc\t/80%\t2\t10\t4\t\n", }, // resource source type, targetUtil { @@ -2439,7 +2439,7 @@ func TestPrintHPA(t *testing.T) { }, }, }, - "some-hpa\tReplicationController/some-rc\t50% / 80%\t2\t10\t4\t\n", + "some-hpa\tReplicationController/some-rc\t50%/80%\t2\t10\t4\t\n", }, // multiple specs { @@ -2498,7 +2498,7 @@ func TestPrintHPA(t *testing.T) { }, }, }, - "some-hpa\tReplicationController/some-rc\t50m / 100m, 50% / 80% + 1 more...\t2\t10\t4\t\n", + "some-hpa\tReplicationController/some-rc\t50m/100m, 50%/80% + 1 more...\t2\t10\t4\t\n", }, }