cuddly-jelly-27016
08/23/2025, 12:09 AMfrom flytekit import ContainerTask, kwtypes, workflow, Resources
hello_task = ContainerTask(
name="hello",
image="ubuntu:20.04",
requests=Resources(cpu="2", mem="1Gi"),
limits=Resources(mem="2Gi"),
command=["echo", "hello"]
)
Running this task results in a pod with cpu limit also set to 2 (same as request), but there should be no cpu limit.
### Expected behavior
If no CPU limit is specified, it is also not set implicitly and no CPU limit is applied in k8s.
So I propose to only copy the requests to limits as a whole if limits are completely unset instead of filling missing limits with the respective requests values.
### Additional context to reproduce
No response
### Screenshots
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
08/23/2025, 12:09 AM