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

TriggerTemplateRun !? #200

Open
skaegi opened this issue Oct 31, 2019 · 9 comments
Open

TriggerTemplateRun !? #200

skaegi opened this issue Oct 31, 2019 · 9 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. maybe-next-milestone

Comments

@skaegi
Copy link
Contributor

skaegi commented Oct 31, 2019

TriggerTemplates are really important to us as we use them to lay down non Tekton resources like ConfigMaps and Secrets however we have been forced to write our own implementation because our eventing is totally different. In addition to event based triggering we support API based triggering and what I observed is that the payload looks remarkably like what I imagine a TriggerTemplateRun object would be if it existed. Maybe something like...

apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplateRun
metadata:
  name: mytemplaterun
spec:
  templateRef:
    name: mytemplate
  params:
  - name: revision
     value: v0.32.0
  - name: url
     value: https://github.com/GoogleContainerTools/skaffold

What I'm wondering is if Triggers could directly expose the TriggerTemplateRun instead of hiding it inside. This would let us adopt the Triggers controller at least for the Templating piece.

@bobcatfish
Copy link
Collaborator

Ah interesting idea! So you'd like a way to trigger the creation of the resources in the TriggerTemplate arbitrarily by providing the values you need 🤔

I think this is an interesting idea and I like the idea of making TriggerTemplates even more useful.

The plumbing repo is handling this problem (b/c they want to have crons that invoke TriggerTemplates) by curling the event listener URL with arbitrary data.

So one question for your use case @skaegi : the event listener is currently the only way to do validation of requests; do you want your TriggerTemplateRun instances to be validated (i.e. invoke an interceptor or just to get created exactly as decribed?

(Nitpick: I'm not sure if Run is the right word here? Tasks and Pipelines run because they have to start and complete, and while I guess that we are starting and completing something here, I feel like we are more "creating" something? I'm gonna create another issue to talk about naming)

@skaegi
Copy link
Contributor Author

skaegi commented Nov 4, 2019

No, I'm not looking for the interceptor to be involved at all. I'm just looking for a way to give a template some params and then make it so.

(re Nitpick: I just was picking on the word Run because it is kind of similar to a Pipeline/TaskRun)

@wlynch
Copy link
Member

wlynch commented Nov 19, 2019

For my own clarification - Is the primary reason to support these is to bundle params for multiple Resources specified in a template, instead of specifying each as a Pipeline/TaskRun? Are there any other advantages you see in specifying this as its own resource?

You may be interested in https://github.com/tektoncd/triggers/pull/226/files#diff-d5a0150984469b75717587a4812ee75aR187-R195 which separates out the behavior you're looking for into a library call rather than a resource.

Separately, this may have some impact/overlap on #189, which I'll try to capture in my proposal. Stay tuned!

@vtereso
Copy link

vtereso commented Jan 13, 2020

We could potentially add a body field (with the above params) to EventListeners, where if detected, the pod would handle that singular "request" and then terminate. However, this would then complicate the status of EventListener (now they terminate?). Like @wlynch, perhaps the the library call above might suit you. @vdemeester any such plans the CLI to provide glue of this sort?

@tekton-robot
Copy link

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

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
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.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Aug 13, 2020
@tekton-robot
Copy link

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/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.

@bobcatfish
Copy link
Collaborator

This is in the project roadmap https://github.com/tektoncd/triggers/blob/master/roadmap.md

/lifecycle frozen

@bobcatfish bobcatfish reopened this Aug 13, 2020
@tekton-robot tekton-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. maybe-next-milestone
Projects
Status: Todo
Development

No branches or pull requests

6 participants