-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add Step and Sidecar Overrides to TaskRun API #4575
Conversation
The following is the coverage report on the affected files.
|
f489825
to
4187cd4
Compare
The following is the coverage report on the affected files.
|
4187cd4
to
9367872
Compare
The following is the coverage report on the affected files.
|
9367872
to
9ab245e
Compare
The following is the coverage report on the affected files.
|
/lgtm |
9ab245e
to
5051661
Compare
The following is the coverage report on the affected files.
|
/lgtm |
It looks like this might not make it for v0.33.0 - is that ok for you @lbernick ? |
that's fine! |
This commit adds TaskRunStepOverrides and TaskRunSidecarOverrides to TaskRun.Spec and PipelineRun.Spec.PipelineTaskRunSpec, gated behind the "alpha" API flag. This is part 1 of implementing TEP-0094: Configuring Resource Requirements at Runtime. https://github.com/tektoncd/community/blob/main/teps/0094-configuring-resources-at-runtime.md
5051661
to
6b4b165
Compare
The following is the coverage report on the affected files.
|
/lgtm |
@lbernick please add release notes 📝 It will be easier for folks to understand the changes since its labeled as a feature 🙏 |
In my understanding this change introduces the API change, documentation and validation, but no actual functionality. |
/hold |
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.
Thanks @lbernick, it looks good!
If you could update the release notes before I run the release, or I can also add them to the PR description if you'd like.
/approve
`StepOverrides` and `SidecarOverrides` must include the `name` field and may include `resources`. | ||
No other fields can be overridden. |
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.
NIT: maybe worth mentioning that it is not possible to override resources for steps that don't have a name
StepOverrides []TaskRunStepOverride `json:"stepOverrides,omitempty"` | ||
SidecarOverrides []TaskRunSidecarOverride `json:"sidecarOverrides,omitempty"` |
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.
NIT: I assume that if a PipelineRun
that specifies any of these was fetched via the v1alpha1
API, it would lose them, which I think it probably fine, but I wonder if we should document somewhere clearly what are the fields in v1beta
which are not in v1alpha
and that would be lost when fetching/updating via v1alpha1
. /cc @sbwsg @vdemeester
Not something we need to fix as part of this PR, it just came to mind seeing the new fields 🙏
errs = errs.Also(apis.ErrMultipleOneOf("name").ViaKey(p.Name)) | ||
names = append(names, p.Name) | ||
} | ||
return validateNoDuplicateNames(names, false) |
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.
Nice :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli 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:
Approvers can indicate their approval by writing |
I added a "hold" because of the release notes, but in fact those can be modified also after the merge, as long as it's done before the release notes are generated. |
/hold cancel |
Done! |
Changes
This commit adds TaskRunStepOverrides and TaskRunSidecarOverrides to TaskRun.Spec and
PipelineRun.Spec.PipelineTaskRunSpec, gated behind the "alpha" API flag.
This is part 1 of implementing TEP-0094: Configuring Resource Requirements at Runtime.
Part 1 of #4326.
/kind feature
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes