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

TEP-0094: Specifying resource requirements at runtime [Problem Statement] #556

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

lbernick
Copy link
Member

@lbernick lbernick commented Nov 8, 2021

This TEP addresses tektoncd/pipeline#4080 and tektoncd/pipeline#4326 by
proposing new configuration to TaskRuns and PipelineTaskRuns that can
override any Step resource requirements specified in a Task or PipelineTask.

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 8, 2021
@lbernick lbernick changed the title [Problem Statement] TEP for specifying resource requirements at runtime TEP-0094: Specifying resource requirements at runtime [Problem Statement] Nov 8, 2021
@lbernick
Copy link
Member Author

lbernick commented Nov 8, 2021

/kind tep

@tekton-robot tekton-robot added the kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). label Nov 8, 2021
@afrittoli
Copy link
Member

/assign @skaegi
/assign @bobcatfish
/assign @afrittoli

@vdemeester
Copy link
Member

/assign

@lbernick lbernick force-pushed the resources branch 3 times, most recently from 50487c6 to 4babc84 Compare November 9, 2021 17:50
Copy link
Contributor

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor thoughts from me but looks great overall!

/approve

teps/0094-configuring-resources-at-runtime.md Outdated Show resolved Hide resolved
teps/0094-configuring-resources-at-runtime.md Show resolved Hide resolved
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2021
This TEP addresses tektoncd/pipeline#4080 and tektoncd/pipeline#4326 by
proposing new configuration to TaskRuns and PipelineTaskRuns that can
override any Step resource requirements specified in a Task or PipelineTask.

Currently, users can specify resource requirements in a `Task` definition,
via the `Resources` field of each `Step`, `StepTemplate`, or `Sidecar`. However, there is currently no support
for modifying these requirements in a `TaskRun` or `PipelineTaskRun`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does PipelineTaskRun mean here? does it refer to PipelineTask? Does it essentially mean modifying requirements in a TaskRun and/or PipelineTask with having reference to a catalog?

Or is it referring to PipelineRun? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a run of a PipelineTask: https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1beta1/pipelinerun_types.go#L468-L481
The idea is to be able to change resource requirements for a Pipeline within a PipelineRun.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For PipelineTaskRun - I'm guessing this will be the place in the API? https://tekton.dev/docs/pipelines/pipelineruns/#specifying-taskrunspecs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could say in TaskRun (issued from PipelineRuns or one-shot) or something like this, but it's a nit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 to the nit, maybe for a future update - i think it's important to be cautious about introducing new terminology. "pipeline task" is already a bit confusing since this isn't a Tekton type, PipelineTaskRun looks like something I'd expect to be a Tekton type (esp mentioned alongside TaskRun)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, I will change this in the subsequent pr.

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @lbernick
It seems like a valid use case, and users ask for it.
/approve


Currently, users can specify resource requirements in a `Task` definition,
via the `Resources` field of each `Step`, `StepTemplate`, or `Sidecar`. However, there is currently no support
for modifying these requirements in a `TaskRun` or `PipelineTaskRun`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For PipelineTaskRun - I'm guessing this will be the place in the API? https://tekton.dev/docs/pipelines/pipelineruns/#specifying-taskrunspecs

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, but looking good 👍🏼


Currently, users can specify resource requirements in a `Task` definition,
via the `Resources` field of each `Step`, `StepTemplate`, or `Sidecar`. However, there is currently no support
for modifying these requirements in a `TaskRun` or `PipelineTaskRun`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could say in TaskRun (issued from PipelineRuns or one-shot) or something like this, but it's a nit.

@skaegi
Copy link
Contributor

skaegi commented Nov 12, 2021

/approve

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @lbernick 🎉

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli, bobcatfish, jerop, skaegi, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • teps/OWNERS [afrittoli,bobcatfish,jerop,skaegi,vdemeester]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vdemeester
Copy link
Member

/lgtm
/meow

@tekton-robot
Copy link
Contributor

@vdemeester: cat image

In response to this:

/lgtm
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2021
@tekton-robot tekton-robot merged commit cb58513 into tektoncd:main Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: Proposed
Development

Successfully merging this pull request may close these issues.

8 participants