From f1b36d737bbfccf3e9dfad93631224693474f93e Mon Sep 17 00:00:00 2001 From: jwcesign Date: Fri, 29 Nov 2024 14:16:22 +0800 Subject: [PATCH] chore: add tag to apg to enhance the SLA Signed-off-by: jwcesign --- pkg/providers/instance/instance.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/providers/instance/instance.go b/pkg/providers/instance/instance.go index 64e3728..5f589f4 100644 --- a/pkg/providers/instance/instance.go +++ b/pkg/providers/instance/instance.go @@ -41,6 +41,7 @@ import ( "sigs.k8s.io/karpenter/pkg/scheduling" "sigs.k8s.io/karpenter/pkg/utils/resources" + "github.com/cloudpilot-ai/karpenter-provider-alibabacloud/pkg/apis" "github.com/cloudpilot-ai/karpenter-provider-alibabacloud/pkg/apis/v1alpha1" "github.com/cloudpilot-ai/karpenter-provider-alibabacloud/pkg/operator/options" "github.com/cloudpilot-ai/karpenter-provider-alibabacloud/pkg/providers/ack" @@ -544,6 +545,10 @@ func (p *DefaultProvider) getProvisioningGroup(ctx context.Context, nodeClass *v SystemDiskPerformanceLevel: systemDisk.PerformanceLevel, Tag: reqTags, }, + // Add this tag to auto-provisioning-group, alibabacloud will monitor the requests and enhance the stability + Tag: []*ecsclient.CreateAutoProvisioningGroupRequestTag{ + {Key: tea.String(apis.Group + "/autoprovisiongroup"), Value: tea.String("true")}, + }, SystemDiskConfig: lo.Map(systemDisk.Categories, func(category string, _ int) *ecsclient.CreateAutoProvisioningGroupRequestSystemDiskConfig { return &ecsclient.CreateAutoProvisioningGroupRequestSystemDiskConfig{