Skip to content

Commit

Permalink
fix: add a kusion-control label in svc labels
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkYuan committed Sep 6, 2023
1 parent 8a13100 commit a59de45
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ const (
suffixPublic = "public"
suffixPrivate = "private"

// aliyun SLB annotations, ref: https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/add-annotations-to-the-yaml-file-of-a-service-to-configure-clb-instances?spm=a2c4g.11186623.0.0.59e26219ESUbqe
// aliyun SLB annotations, ref: https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/add-annotations-to-the-yaml-file-of-a-service-to-configure-clb-instances
aliyunLBSpec = "service.beta.kubernetes.io/alibaba-cloud-loadbalancer-spec"
aliyunSLBS1Small = "slb.s1.small"
kusionControl = "kusionstack.io/control"
)

var (
Expand Down Expand Up @@ -163,6 +164,7 @@ func (g *portsGenerator) generateK8sSvc(public bool, ports []network.Port) *v1.S

// only support Aliyun SLB for now, and set SLB spec by default.
svc.Annotations[aliyunLBSpec] = aliyunSLBS1Small
svc.Labels[kusionControl] = "true"
}

return svc
Expand Down

0 comments on commit a59de45

Please sign in to comment.