-
Notifications
You must be signed in to change notification settings - Fork 44
added trigger controller and reconciler #716
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
base: main
Are you sure you want to change the base?
added trigger controller and reconciler #716
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: astelmashenko The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #716 +/- ##
==========================================
+ Coverage 30.81% 31.53% +0.72%
==========================================
Files 53 55 +2
Lines 3096 3304 +208
==========================================
+ Hits 954 1042 +88
- Misses 2074 2192 +118
- Partials 68 70 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/assign @Cali0707 |
A custom broker implementation consists of few components:
Custom broker implemnetation step2: trigger controller
Brokers work with eventing triggers, since there custom broker class for NatsJetsream we need to reac when triggers are created/updated/deleted for brokers with the new custom broker class. An example of broker trigger.
Broker:
Trigger:
There are two main files:
pkg/broker/trigger/controller.goandpkg/broker/trigger/reconciler.goTrigger controller loads nats conn options, subscribes to events from trigger and broker CRD filtering by broker class to react on CRD changes; and create a reconciler.
Trigger reconciler cheks trigger related things: broker status, subscriber, dlq, etc and updates trigger conditions and overall status. JetStream specific is it checks if a stream exists, and creates/updates a consumer for the Nats stream. Consumer configuration is based on Trigger spec.Delivery, to utilize retries based on JetStream consumer features, instead of in-memory retries, it will be visible in future PR related to filter.