tektoncd / triggers

Event triggering with Tekton!
Apache License 2.0
558 stars 420 forks source link

Add ability to trigger on kubernetes resouces, not only web hooks #478

Closed dbazhal closed 3 years ago

dbazhal commented 4 years ago

Expected Behavior

Any way to trigger on some in-cluster event/resource required. Watch-list objects of some type, or watch kubernetes events, and when an object meets some conditions - then take some infro from it, and trigger as tekton triggers usually do - create object(usually taskrun/pipelinerun).

Actual Behavior

Now we can only trigger on some external http events.

dibyom commented 4 years ago

/kind feature

vtereso commented 4 years ago

I like the idea of this. However, most resources have their own controller so I don't entirely know the use case.

dbazhal commented 4 years ago

I like the idea of this. However, most resources have their own controller so I don't entirely know the use case.

I won't be inventing new ideas, my own goals for example are to:

dbazhal commented 4 years ago

Oh, and another reasons came to mind.

  1. kubernetes deployments watch themself and run rollout on change
  2. in okd <= 3.11 there are buildconfigs/deploymentconfigs, and they all can trigger when themselves change

Tekton pipelines and tasks do not run themselves on change, because they are separated from their runs. So there must be some tool to run tekton pipeline when it changes. Tekton triggers could be such tool.

wlynch commented 4 years ago

You might be interested in https://knative.dev/docs/eventing/samples/kubernetes-event-source/ which would allow you to produce events that could then be consumed/filtered by Tekton Triggers.

dbazhal commented 4 years ago

You might be interested in https://knative.dev/docs/eventing/samples/kubernetes-event-source/ which would allow you to produce events that could then be consumed/filtered by Tekton Triggers.

Oh, thank you. We're looking into knative eventing right now, but that seem to be pretty complex tool, yet pretty rigid, so writing our own small trigger controller looks easier and more flexible in short term.

tekton-robot commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@tekton-robot: Closing this issue.

In response to [this](https://github.com/tektoncd/triggers/issues/478#issuecomment-673775861): >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](https://github.com/tektoncd/plumbing). Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dbazhal commented 4 years ago

So if I'm not updating feature request every month, it's "rejected"?

dbazhal commented 4 years ago

Can this please be reopened?) Would like to see this in future

tekton-robot commented 3 years ago

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 commented 3 years ago

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.

ibotty commented 3 years ago

It's still relevant. Please remove label.

jmcshane commented 3 years ago

one thing to note here is that if you use case is to trigger on something around a pipelinerun/taskrun executing, you can use the cloudevent configuration on the config-defaults tekton-pipelines configmap to send those events to a target eventlistener. if you need to send those across multiple eventlisteners, you can use a forwarder to send those events to multiple targets (without needing to deploy knative).

jmcshane commented 3 years ago

https://tekton.dev/docs/pipelines/events/#events-via-cloudevents

tekton-robot commented 3 years ago

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 commented 3 years ago

@tekton-robot: Closing this issue.

In response to [this](https://github.com/tektoncd/triggers/issues/478#issuecomment-839930375): >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](https://github.com/tektoncd/plumbing). Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ibotty commented 3 years ago

On OpenShift/OKD I'd like to trigger on Changes in ImageStreamTags. I'd like to reopen that issue.

dibyom commented 3 years ago

@ibotty Would you mind opening a new GH issue for that? Thanks!

ibotty commented 3 years ago

But wouldn't it be the same issue as that one? Or do you mean specifically for ImageStreamTags?