feat: Add config option to filter events based on namespace #278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
When deploying the agent in an environment where some apps may already be instrumented and the agent would be duplicating events. It is desireable that some namespaces be omitted from generating events.
This PR adds a configuration option to provide a list of namespaces that will be used as an exclude list. When either the source or destination IP matches a pod or service that is in an excluded namespaces, it is not converted into a libhoney event.
Short description of the changes
NAMESPACES
env var built from a comma separated listHow to verify that this has the expected result
It's now possible to provide a list of namespaces that will be used ignore events when the event's source or destination resource is in that namespace.