Mahesh
Mahesh

Reputation: 41

Kubernetes Container Resouces are not getting applied correctly when setting it using go client

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

                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"),
                        },
                     },

Upvotes: 1

Views: 67

Answers (0)

Related Questions