-
Notifications
You must be signed in to change notification settings - Fork 290
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
Add a support for ignoring the events from a namespace that matches regexp #386
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jkremser
force-pushed
the
issue295-ignore-regexp-ns
branch
from
October 1, 2020 14:59
b3c44fd
to
e1b0f2c
Compare
Awesome! Thanks for the PR @jkremser 🙏 |
PrasadG193
approved these changes
Oct 1, 2020
PrasadG193
requested changes
Oct 1, 2020
jkremser
force-pushed
the
issue295-ignore-regexp-ns
branch
from
October 1, 2020 22:01
e1b0f2c
to
13949ef
Compare
jkremser
changed the title
Add a support for ignoring the events from a namespace that matches regexp
[WIP] Add a support for ignoring the events from a namespace that matches regexp
Oct 2, 2020
… regular expression (kubeshop#295)
jkremser
force-pushed
the
issue295-ignore-regexp-ns
branch
from
October 2, 2020 11:21
13949ef
to
db4f63e
Compare
jkremser
changed the title
[WIP] Add a support for ignoring the events from a namespace that matches regexp
Add a support for ignoring the events from a namespace that matches regexp
Oct 2, 2020
PrasadG193
reviewed
Oct 2, 2020
Co-authored-by: Prasad Ghangal <prasad.ghangal@gmail.com>
PrasadG193
approved these changes
Oct 2, 2020
mszostok
added a commit
to mszostok/botkube
that referenced
this pull request
Jun 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes issue #295
ISSUE TYPE
SUMMARY
This change allows to ignore whole sets of namespaces using the asterix expansion. It still does the exact match check for all the namespaces (separated by comma in config), but if it contains a
*
, it's actually replaced with.*
and passed toregexp.MatchString
to do the job.PR also contains couple of very simple test cases.
deps:
namespace_checker.go
now imports alsoregexp
Fixes #295
It's my very first golang code, so please let me know if it's not idiomatic go 🍪