Skip to content

feat(monitor): add an events channel to avoid event loss caused by delayed docker event processing #1930

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slashexx
Copy link

@slashexx slashexx commented Jan 1, 2025

Purpose of PR?:

Fixes #1929

Does this PR introduce a breaking change?
No

If the changes in this PR are manually verified, list down the scenarios covered::

Additional information for reviewer? :
This PR addresses the Docker event queue buffer issue by adding processing logic in dockerHandler.go. It is part of improving KubeArmor's ability to handle high-frequency Docker events efficiently.

Checklist:

@slashexx slashexx changed the title feat(monitor): add a buffered events channel to avoid event loss caused by delayed docker event processing feat(monitor): add a buffered channel to avoid event loss caused by delayed docker event processing Jan 1, 2025
@slashexx slashexx changed the title feat(monitor): add a buffered channel to avoid event loss caused by delayed docker event processing feat(monitor): add an events channel to avoid event loss caused by delayed docker event processing Jan 1, 2025
Copy link
Collaborator

@rksharma95 rksharma95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slashexx Thanks for the PR, rest LGTM, just a few comments from my side. let me know wdyt?

@rksharma95
Copy link
Collaborator

@slashexx can you please squash the commits?

@slashexx
Copy link
Author

@rksharma95 commits have been squashed !

@rksharma95 rksharma95 requested a review from daemon1024 January 21, 2025 06:56
Copy link
Collaborator

@rksharma95 rksharma95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@slashexx
Copy link
Author

It's been open for a while, gentle ping @Prateeknandle @daemon1024 , is it gtg ?

@daemon1024
Copy link
Member

Hey @slashexx yep it mostly good to go. We currently have code freeze, only fixing bugs for upcoming stable release. We will start reviewing new PRs again after v1.5.1 release. Appreciate the PR!

@daemon1024 daemon1024 moved this to P0 - PR Ready for review in Release v1.6 Mar 20, 2025
@daemon1024
Copy link
Member

We will get this merged ASAP, Sorry for taking so long. Appreciate the contribution.

Signed-off-by: slashexx <[email protected]>

fix: update event options in Docker event stream to use ListOptions

Signed-off-by: slashexx <[email protected]>

refactor: remove unused import for Docker API types in dockerHandler

Signed-off-by: slashexx <[email protected]>

refactor: update GetEventChannel to accept context and stop channel for better event handling

Signed-off-by: slashexx <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: P0 - PR Ready for review
Development

Successfully merging this pull request may close these issues.

Add buffer queue processing when a large number of Docker information is updated
3 participants