-
Notifications
You must be signed in to change notification settings - Fork 221
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
status: proposed | ||
title: Configuring Resources at Runtime | ||
creation-date: '2021-11-08' | ||
last-updated: '2021-11-08' | ||
authors: | ||
- '@lbernick' | ||
--- | ||
|
||
# TEP-0094: Configuring Resources at Runtime | ||
|
||
<!-- toc --> | ||
- [Summary](#summary) | ||
- [Motivation](#motivation) | ||
- [Goals](#goals) | ||
- [Non-Goals](#non-goals) | ||
- [Use Cases](#use-cases) | ||
- [Requirements](#requirements) | ||
<!-- /toc --> | ||
|
||
## Summary | ||
Add runtime configuration options for setting resource requirements of `Step`s and `Sidecar`s. | ||
|
||
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`. | ||
|
||
This TEP proposes adding a configuration option to `TaskRun` and `PipelineTaskRun` | ||
to override any `Step` or `Sidecar` resource requirements specified in a `Task` or `PipelineTask`. | ||
|
||
## Motivation | ||
Compute resource requirements typically depend on runtime constraints. | ||
The following issues contain user requests for being able to modify resource requirements at runtime: | ||
|
||
- [Allow usage of variable replacement when defining resource limits and requests](https://github.com/tektoncd/pipeline/issues/4080) | ||
- [Support specifying resource requests at TaskRun level](https://github.com/tektoncd/pipeline/issues/4326) | ||
|
||
### Goals | ||
|
||
Add configuration to `TaskRun` and `PipelineTaskRun` allowing users to specify resource requirements | ||
of `Step`s or `Sidecar`s defined in a `Task` or `PipelineTask`. | ||
|
||
### Non-Goals | ||
|
||
- Ability to override other `Step` or `Sidecar` fields in a `TaskRun` or `PipelineTaskRun`. | ||
- Ability to specify combined resource requirements of all `Step`s or `Sidecar`s at `Task` or `Pipeline` level. | ||
While this may be a valuable feature, it should be considered in a separate proposal. | ||
|
||
### Use Cases | ||
|
||
- Image or code building `Task`s can use different amounts of compute resources | ||
depending on the image or source being built. | ||
lbernick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Kubeflow pipelines and other data pipelines may have variable resource requirements | ||
depending on the data being processed. | ||
- Catalog Tasks should be generally reusable in different environments | ||
that may have different resource constraints. | ||
|
||
## Requirements | ||
|
||
- Users can specify `Step` and `Sidecar` resource requirements at runtime. | ||
- Users can specify `Step` and `Sidecar` resource requirements for `Task`s | ||
or `Pipeline`s they don't own, especially those in the Catalog. | ||
- Users can specify resource requirements for individual `Step`s and `Sidecar`s. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 toPipelineTask
? Does it essentially mean modifying requirements in aTaskRun
and/orPipelineTask
with having reference to a catalog?Or is it referring to
PipelineRun
? 🤔There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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-taskrunspecsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup!
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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 alongsideTaskRun
)There was a problem hiding this comment.
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.