已在 eci/create_container_group.go 文件的 CreateContainerGroupRequest 结构体中添加了 AutoCreateEip 字段
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 3m50s
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 3m50s
This commit is contained in:
1
eci.go
1
eci.go
@@ -188,6 +188,7 @@ func (p *ECIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error {
|
||||
// 添加抢占式实例策略配置
|
||||
request.SpotStrategy = "SpotAsPriceGo" // 设置抢占式实例策略为按价格竞价
|
||||
//request.SpotDuration = 0 // 设置抢占式实例持续时间为0(非定时抢占)
|
||||
request.AutoCreateEip = true //
|
||||
|
||||
// get containers
|
||||
containers, err := p.getContainers(pod, false)
|
||||
|
||||
@@ -89,6 +89,7 @@ type CreateContainerGroupRequest struct {
|
||||
VSwitchId string `position:"Query" name:"VSwitchId"`
|
||||
Volumes []Volume `position:"Query" name:"Volume" type:"Repeated"`
|
||||
ContainerGroupName string `position:"Query" name:"ContainerGroupName"`
|
||||
AutoCreateEip requests.Boolean `position:"Query" name:"AutoCreateEip"`
|
||||
ZoneId string `position:"Query" name:"ZoneId"`
|
||||
SpotStrategy string `position:"Query" name:"SpotStrategy"`
|
||||
// SpotDuration requests.Integer `position:"Query" name:"SpotDuration"`
|
||||
|
||||
Reference in New Issue
Block a user