-
Notifications
You must be signed in to change notification settings - Fork 183
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
Events plugin #35
Events plugin #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fluent-plugin-events/LICENSE
Outdated
@@ -0,0 +1,202 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need a LICENSE for each plugin, so it can be removed
if (!@resource_version) | ||
@resource_version = 0 | ||
sleep(5) | ||
start_watcher_thread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my understanding correctly, you want to restart a watcher if something get wrong, but that should also handle the exceptions like invalid JSON or parsing failure?
And on the other side, the watcher restart in another thread, may cause thread leaking? (like different threads start multiple watcher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should also handle the exceptions like invalid JSON or parsing failure?
This is a good point. I will add some exception handling for invalid JSON and parsing failure after we receive each event. What should we do in case of that? Should we just log the exception/error and skip the event we can't parse and move on?
the watcher restart in another thread, may cause thread leaking? (like different threads start multiple watcher?
After the current thread calls start_watcher_thread
here, it breaks out of the watch loop and finishes executing its block of code. I think at this point this thread is considered completed and not running.
* Write terraform resource reference for collector_ids and role_ids * Only get the role names once and before beginning to write to the config file * Fix how roles are written to file * Add roles files output from script to gitignore * Add script that imports resources into terraform * Add docstrings to functions * Add new line * Fix return type for function
This PR adds the event plugin to collect k8s events from the API server. To start the events deployment, run
We will need to move everything in this yaml file to the existing file
fluentd-sumologic.yaml
once everything has finalized, in a separate PR.This diagram shows the flow of the plugin:
Currently I am duplicating connector.rb (connects to kubeclient) that @bin3377 wrote in the enhance-k8s-metadata plugin. We will refactor it later.
FYI @lei-sumo @samjsong @rvmiller89