From c6d308f1f22e55033daa5579d4dc033dd6b2ba9b Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Thu, 5 Nov 2020 12:56:27 +0800 Subject: [PATCH] fix the label of auto scaling group Signed-off-by: Ryan Leung --- pkg/autoscaling/calculation.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/autoscaling/calculation.go b/pkg/autoscaling/calculation.go index 79a18ea7cb3..d6ea8c36dbb 100644 --- a/pkg/autoscaling/calculation.go +++ b/pkg/autoscaling/calculation.go @@ -14,6 +14,7 @@ package autoscaling import ( + "fmt" "math" "strings" "time" @@ -425,7 +426,7 @@ func findBestGroupToScaleOut(strategy *Strategy, scaleOutQuota float64, groups [ ResourceType: resources[0].ResourceType, Labels: map[string]string{ // TODO: we need to make this label not duplicated when we implement the heterogeneous logic. - groupLabelKey: autoScalingGroupLabelKeyPrefix + component.String(), + groupLabelKey: fmt.Sprintf("%s-%s", autoScalingGroupLabelKeyPrefix, component.String()), resourceTypeLabelKey: resources[0].ResourceType, }, }