Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make generated pods only request the maximum necessary resources #723

Merged
merged 1 commit into from
Apr 12, 2019

Commits on Apr 12, 2019

  1. Make generated pods only request the maximum necessary resources

    Before this change, if CPU, memory, or ephemeral storage resource
    requests were set in a Task's steps (which are Containers), the
    generated Pod would require the sum of all of the steps' requests
    to be scheduled on a Node. However, because Tekton overwrites
    Container entrypoints in Tasks to make the Containers logically
    execute one at a time, we want to make Pods generated by the TaskRun
    only request the maximum resources that will be necessary for any
    single Container rather than the sum of all resource requests.
    
    To make this happen, when generating a Pod for a Task, we find the
    Step with largest resource requests among all Steps, and set the
    resource requests for all other steps to 0 for the respective
    resource. If no Step has an explicit resource request, all requests
    are set to 0. If we unset resource requests instead of setting them
    to 0 explicitly, then the limits would be used for the requests,
    which would defeat the purpose of unsetting the requested values
    (and could end up making the Pod request more memory than it did in
    the first place).
    
    Fixes tektoncd#598
    dwnusbaum committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    a8c6493 View commit details
    Browse the repository at this point in the history