gpt4 book ai didi

Kubernetes Container Resouces are not getting applied correctly when setting it using go client(使用GO客户端进行设置时,Kubernetes容器资源应用不正确)

转载 作者:bug小助手 更新时间:2023-10-25 12:52:39 25 4
gpt4 key购买 nike



I am trying to use go client to include resources for my argo workflow container with below code and when I am running it I can see the pod is getting correctly but the container resources field is empty {}. Not sure why the resources are not getting set from my code. Any thoughts or suggestion on what I am doing here wrong or missing will be really helpful please

我正在尝试使用Go客户端为我的Argo工作流容器包含以下代码的资源,当我运行它时,我可以看到Pod正在正确获取,但容器资源字段为空{}。不确定为什么我的代码没有设置资源。对于我在这里做错了什么或错过了什么,如果有任何想法或建议,都将是非常有用的,请


                Name: "test",
Container: &apiv1.Container{
Image: imageaName,
Resources: apiv1.ResourceRequirements{
Requests: map[apiv1.ResourceName]resource.Quantity{
"cpu": resource.MustParse("10m"),
"memory": resource.MustParse("64M"),
},
Limits: map[apiv1.ResourceName]resource.Quantity{
"cpu": resource.MustParse("20m"),
"memory": resource.MustParse("100M"),
},
},


更多回答
优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com