pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

FR: pipelineRun.spec.taskRunTemplate

Open lbernick opened this issue 2 years ago • 14 comments

Feature request

We already have pipelineRun.spec.taskRunSpecs, but it might be nice to be able to specify a TaskRun configuration that applies to every TaskRun in the PipelineRun by default. An analogous feature is task.spec.stepTemplate.

Example use cases

  • I would like to use the same service account for all of my pipeline tasks except one.
  • I want to specify compute resources that each TaskRun in my PipelineRun should run with, and don't want to have to specify them individually for each TaskRun.

lbernick avatar Aug 10 '22 13:08 lbernick

/assign

yuzp1996 avatar Aug 11 '22 08:08 yuzp1996

taskRunTemplate should be a field of pipelineRun.spec or a field of pipeline.spec ?

yuzp1996 avatar Aug 11 '22 09:08 yuzp1996

I think we'd want this to be on PipelineRun, since the use cases I mentioned (service account and compute resources) are probably things you'd want to specify for a pipelinerun rather than a Pipeline. However (I should have mentioned this in the initial issue) I think we should have a small TEP (design proposal) for this before implementing it just to make sure there are no concerns from maintainers. Is that something you'd be willing to do, with help from me?

lbernick avatar Aug 11 '22 15:08 lbernick

I think we'd want this to be on PipelineRun, since the use cases I mentioned (service account and compute resources) are probably things you'd want to specify for a pipelinerun rather than a Pipeline. However (I should have mentioned this in the initial issue) I think we should have a small TEP (design proposal) for this before implementing it just to make sure there are no concerns from maintainers. Is that something you'd be willing to do, with help from me?

Of course! I would like to do it! Thanks for your help!@lbernick

Maybe I should create a TEP PR in Tekton/community first?

yuzp1996 avatar Aug 12 '22 00:08 yuzp1996

Thank you, that would be amazing! The instructions for creating a new TEP are here. Please let me know if you need any help with this.

lbernick avatar Aug 12 '22 13:08 lbernick

Thank you, that would be amazing! The instructions for creating a new TEP are here. Please let me know if you need any help with this.

Yes! I will 😁 !

Since I'm not good at English and I need to do some in-depth research, it will take some time to create the TEP, but I'll sync the progress here.

yuzp1996 avatar Aug 13 '22 11:08 yuzp1996

Thanks so much for adding the TEP @yuzp1996! are you still interested in implementing this, or should we assign someone else? Either way works!

lbernick avatar Sep 06 '22 19:09 lbernick

I am sorry! It is on me that I didn't notice the message just until a few hours ago. Yes I am, I will assign it to me Thanks!

发自我的小米 在 Lee Bernick @.***>,2022年9月7日 上午3:36写道:

Thanks so much for adding the TEP @yuzp1996https://github.com/yuzp1996! are you still interested in implementing this, or should we assign someone else? Either way works!

— Reply to this email directly, view it on GitHubhttps://github.com/tektoncd/pipeline/issues/5302#issuecomment-1238572363, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFPRBWHJG22PK7VWNVPMBQTV46MKZANCNFSM56ETZ6XA. You are receiving this because you were mentioned.Message ID: @.***>

yuzp1996 avatar Sep 13 '22 00:09 yuzp1996

@JeromeJu welcome! 😀

yuzp1996 avatar Sep 13 '22 02:09 yuzp1996

When should we start to implement this TEP? I remember we need to implement it in V1. When will V1 be released? I can not find that in the roadmap.

yuzp1996 avatar Sep 13 '22 04:09 yuzp1996

We already have v1 Go structs here. Before we release v1, we need to move serviceAccountName and podTemplate to pipelineRun.spec.TaskRunTemplate in this folder. After releasing v1, we can implement the rest of the TaskRunTemplate fields.

lbernick avatar Sep 13 '22 13:09 lbernick

Ok! I am worried I will not be able to start to implement it immediatly because I will be a little busy for my work in the next few weeks.

Look like @JeromeJu is fine to do it. Maybe you can start to implement it now. I can just help review the PR if possiable! Thanks!

yuzp1996 avatar Sep 14 '22 00:09 yuzp1996

Ok! I am worried I will not be able to start to implement it immediatly because I will be a little busy for my work in the next few weeks.

Look like @JeromeJu is fine to do it. Maybe you can start to implement it now. I can just help review the PR if possiable! Thanks!

Sounds good. Thank you for the excellent collaboration on the TEP work.

JeromeJu avatar Sep 14 '22 14:09 JeromeJu

TODO: implement the rest of the fields after v1 release

JeromeJu avatar Sep 16 '22 16:09 JeromeJu

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Dec 15 '22 16:12 tekton-robot

/remove-lifecycle stale #5579 unblocks this

JeromeJu avatar Dec 15 '22 18:12 JeromeJu

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Mar 18 '23 21:03 tekton-robot

How about support taskTemplate in Pipeline.Tasks. I found it's impossible to build multi arch image with kaniko with multi tasks planed to run on different arch nodes.

wuhuizuo avatar Mar 26 '23 08:03 wuhuizuo

Thanks @wuhuizuo, could you give an example of what you'd like to exist? I'm curious why pipelinerun.spec.taskrunspecs does not work for your use case.

lbernick avatar Mar 28 '23 20:03 lbernick

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Apr 27 '23 21:04 tekton-robot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot avatar May 27 '23 22:05 tekton-robot

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

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 avatar May 27 '23 22:05 tekton-robot

Thanks @wuhuizuo, could you give an example of what you'd like to exist? I'm curious why pipelinerun.spec.taskrunspecs does not work for your use case.

Sorry for late reply. I discussed it in slack channel, also I created a issue in community

wuhuizuo avatar May 29 '23 09:05 wuhuizuo