Skip to content

Commit 8b7c439

Browse files
author
Wei
authored
Merge pull request #141 from IrisIris/main
add ACK autoscaling default lables
2 parents 33b7095 + d3684a3 commit 8b7c439

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/providers/ack/ack.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import (
3636
"github.com/cloudpilot-ai/karpenter-provider-alibabacloud/pkg/apis/v1alpha1"
3737
)
3838

39+
const defaultNodeLabel = "k8s.aliyun.com=true"
40+
3941
type Provider interface {
4042
GetNodeRegisterScript(context.Context, map[string]string, *v1alpha1.KubeletConfiguration) (string, error)
4143
GetClusterCNI(context.Context) (string, error)
@@ -134,7 +136,7 @@ func (p *DefaultProvider) resolveUserData(respStr string,
134136

135137
// TODO: now, the following code is quite ugly, make it clean in the future
136138
// Add labels
137-
labelsFormated := fmt.Sprintf("ack.aliyun.com=%s", p.clusterID)
139+
labelsFormated := fmt.Sprintf("%s,ack.aliyun.com=%s", defaultNodeLabel, p.clusterID)
138140
for labelKey, labelValue := range labels {
139141
labelsFormated = fmt.Sprintf("%s,%s=%s", labelsFormated, labelKey, labelValue)
140142
}

0 commit comments

Comments
 (0)