@@ -41,6 +41,7 @@ type Config struct {
4141 IsApp bool `yaml:"isApp,omitempty"`
4242 TagIDs []string `yaml:"tagIDs,omitempty"`
4343 InstanceIDs []string `yaml:"instanceIDs,omitempty"`
44+ PlaceGroupID string `yaml:"placeGroupID,omitempty"`
4445}
4546
4647// A single Kubernetes cluster can run in multiple zones,
@@ -211,8 +212,8 @@ func (qc *QingCloud) ensureLoadBalancer(ctx context.Context, _ string, service *
211212 klog .V (4 ).Infof ("EnsureLoadBalancer lb %s config %s" , spew .Sdump (lb ), spew .Sdump (conf ))
212213 if err != nil {
213214 if errors .IsResourceNotFound (err ) && conf .Policy != ReuseExistingLB && conf .Policy != Shared {
214- // will auto create lb with assigned eip
215- klog .Infof ("lb not found for service %s/%s, going to create lb with assigned eip " , service .Namespace , service .Name )
215+ // will auto create lb with assigned eip or vxnet
216+ klog .Infof ("lb not found for service %s/%s, going to create lb with assigned eip or vxnet " , service .Namespace , service .Name )
216217 } else {
217218 return nil , fmt .Errorf ("getLoadBalancer error: %v" , err )
218219 }
@@ -339,6 +340,7 @@ func (qc *QingCloud) ensureLoadBalancer(ctx context.Context, _ string, service *
339340 VxNetID : conf .VxNetID ,
340341 PrivateIPs : []* string {conf .InternalIP },
341342 EIPs : conf .EipIDs ,
343+ PlaceGroupID : conf .PlaceGroupID ,
342344 },
343345 })
344346 if err != nil {
0 commit comments