🐛 fix(eci): 移除抢占式实例持续时间配置
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 5m16s

- 注释掉 SpotDuration 参数设置
- 在 CreateContainerGroupRequest 结构中注释掉 SpotDuration 字段
This commit is contained in:
D8D Developer
2025-07-01 06:51:04 +00:00
parent df7b5af263
commit 6c0ffc0567
2 changed files with 3 additions and 1 deletions

2
eci.go
View File

@@ -187,7 +187,7 @@ func (p *ECIProvider) CreatePod(ctx context.Context, pod *v1.Pod) error {
// 添加抢占式实例策略配置
request.SpotStrategy = "SpotAsPriceGo" // 设置抢占式实例策略为按价格竞价
request.SpotDuration = 0 // 设置抢占式实例持续时间为0非定时抢占
//request.SpotDuration = 0 // 设置抢占式实例持续时间为0非定时抢占
// get containers
containers, err := p.getContainers(pod, false)

View File

@@ -90,6 +90,8 @@ type CreateContainerGroupRequest struct {
Volumes []Volume `position:"Query" name:"Volume" type:"Repeated"`
ContainerGroupName string `position:"Query" name:"ContainerGroupName"`
ZoneId string `position:"Query" name:"ZoneId"`
SpotStrategy string `position:"Query" name:"SpotStrategy"`
// SpotDuration requests.Integer `position:"Query" name:"SpotDuration"`
}
type CreateContainer struct {