Giter VIP home page Giter VIP logo

Comments (10)

vtereso avatar vtereso commented on July 17, 2024

@vincent-pli Thanks for raising this. I think there are a few points to be considered.

  • What about when TriggerBindings and TriggerTemplates are deleted?
  • Should we create reconcilers for TriggerBindings and TriggerTemplates to notify the EventListener of changes? Will validation restrict this since modifying one of these resources at a time will invalidate the EventListener trigger?

from triggers.

vincent-pli avatar vincent-pli commented on July 17, 2024

@vtereso Thanks for your comments.

What about when TriggerBindings and TriggerTemplates are deleted?

This scenario is fatal error, should high light in the status of related EventListener immediately. The pod should keep running.

Should we create reconcilers for TriggerBindings and TriggerTemplates to notify the EventListener of changes? Will validation restrict this since modifying one of these resources at a time will invalidate the EventListener trigger?

I prefer let controller of EventListener to watch TriggerBinding and TriggerTemplate.
In reconciler of EventListener, we could:

  • Add specific tag to related TriggerBinding and TriggerTemplate, maybe the value of tag is the resource name of that EventListener
  • Watching TriggerBinding and TriggerTemplate
  • If related TriggerBinding or TriggerTemplate updated or deleted, the reconciler will triggered, then do validation and take action.

from triggers.

vincent-pli avatar vincent-pli commented on July 17, 2024

I think about the solution today, the implementation will be complex. is that worth πŸ€” ?

from triggers.

vtereso avatar vtereso commented on July 17, 2024

I think about the solution today, the implementation will be complex. is that worth πŸ€” ?

I think it makes sense to keep this issue open since it also falls under the umbrella of #35, but I agree it is non-trivial to implement.

from triggers.

vincent-pli avatar vincent-pli commented on July 17, 2024

Summary the solution here:

  1. In reconcile of EventListener add specific tag to TriggerTemplate and TriggerBinding.
  2. Record the Generation of TriggerTemplate and TriggerBinding to the EventListener.status.generations
  3. Watch the TriggerTemplate and TriggerBinding, when update occurred, the related EventLister (find by the label added in step 1) will enter the work queue.
  4. In reconcile, check the Generation between TriggerTemplate.Generation and EventListener.status.generations, if not same, take action (emit event or whatever)

from triggers.

vincent-pli avatar vincent-pli commented on July 17, 2024

Hi guys, the implements is not follow the upper design, more simple:

  1. Start watcher in the pod which created by EventListener, the watcher will watch on related TriggerBinding and TriggerTemplate.
  2. If any Delete and Update occurred on related TriggerBinding and TriggerTemplate, a k8s event will be send and bind to related EventListener

from triggers.

tekton-robot avatar tekton-robot commented on July 17, 2024

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.

from triggers.

tekton-robot avatar tekton-robot commented on July 17, 2024

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.

from triggers.

tekton-robot avatar tekton-robot commented on July 17, 2024

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.

from triggers.

tekton-robot avatar tekton-robot commented on July 17, 2024

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

from triggers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.