<#3574 [BUG] unset CPU limit is overridden with CP...
# flyte-github
a
#3574 [BUG] unset CPU limit is overridden with CPU request Issue created by flixr Describe the bug A container task with only CPU requests but no limits set, still gets limits applied:
Copy code
from 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/flyte