-
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
[FR] Specifying compute resources on Pipeline Tasks #5110
Comments
Thanks for opening this! We were discussing this again internally, and we came out of that discussion one step closer to "let's switch to PipelineRuns". There are other things that can be done with PipelineRuns that can't be done with Pipelines, such as inline task specs. So we're wondering if we would just fight against a design choice if we continue to go with the pipeline approach. On top, viewing the config file in the Git repo as the "pipeline definition" feels "right". We only really use the Pipeline CRD to have a grouping mechanism in the UI. Since most people probably navigate straight from the CI build status to the PipelineRun, it may not be so bad if we loose the grouping in the UI. Plus, one can still filter runs by label, which is more cumbersome, but still OK. All in all, it looks like this is becoming less critical for us, but #4235 (for pipeline runs) is still very high on our "wish list" :) |
Good to know! Just FYI-- I am wondering if our upcoming pipelines in pipelines feature will help with your use case? Your users could define Pipelines, and they could be used as sub-Pipelines within Pipelines you create. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
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. |
Hey @lbernick your wish (parameterization of resource requirements in Tasks) seems still inpossible. Did you our your team have any solution and/or workaround for this in the meantime? |
Compute resource requirements can't be parameterized, but they can be specified in TaskRuns at the task level or the step/sidecar level. They can also be specified in pipelinerun.spec.taskrunspecs. |
Thanks for the quick reply! Yeah we doing that now. But i'd like to parameterize so that we could be more flexible. A trigger from Repo X needs a bigger resource (for a specific task) then a trigger from repo Y for example. |
Can you try this?
A TriggerTemplate's |
I'll try to create an environment to test this! |
Sorry to be a pain I know this is closed but I am looking at this now triggertemplate that has a PipelineRun I have and I was just wondering do you have examples of this or a pointer to go to ? docs seem a bit sparse Thank you @lbernick |
Thanks @EoinMan for testing this out! Can you please provide your trigger template + pipelineRun spec and more details about what is not working? Existing docs for compute resources are here and docs for trigger templates are here. If there's info you'd like to see in docs but isn't there, it would be super helpful if you could open an issue in pipelines or triggers with the information you'd like to see. |
ty for getting back to me I might have read things wrong on second look
|
Thanks @EoinMan, could you please provide a bit more detail on what's not working? Looking at this now I don't think this is a valid PipelineRun (it doesn't have a pipelineSpec or pipelineRef but I'm not sure if you omitted those for brevity). It looks like |
Hi @lbernick 😄 , any updates on this issue? |
Feature request
Example:
Use case
Spin-off from #4080. In OpenDevStack, the user is responsible for configuring Pipeline Tasks, and the platform automatically injects some additional starting/finally tasks and creates PipelineRuns. From @michaelsauter "We have been thinking to simply create PipelineRuns instead of Pipelines from our config file, in order to move into the "runtime", but the downside of that is that e.g. grouping of runs in the UI is lost (we're using the OpenShift console)."
Design principles thoughts
Compute resources are definitely a "runtime" concept instead of an "authoring time" concept, but there's some precedent for including runtime concepts in PipelineTasks: e.g. timeout.
Implementation thoughts
One way to implement this feature would be to support parameterization of resource requirements in Tasks (the original request in #4080). This would allow a Task's resource requirements to be defined in a Pipeline. For example:
I don't think this is a good idea long term, because I think we should move away from a model where compute resources are specified on Tasks (they should be specified in TaskRuns and PipelineRuns instead, and Pipelines if we choose to implement this FR). However, parameterizing Task compute resource requirements could address the use case in the short term.
A different way to implement this feature would be to just add these fields to our API, as in the first example above. I personally feel this would be a better solution. If we go this route, it's probably a good idea to wait until #4470 is implemented and we have feedback on it.
The text was updated successfully, but these errors were encountered: