-
Notifications
You must be signed in to change notification settings - Fork 295
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
Support include/exclude regexes for event and resource constraints #963
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
pkosiec
force-pushed
the
complex-regexes
branch
from
February 1, 2023 16:15
8880b38
to
d89c64b
Compare
Converting to draft after internal conversation about our preferred approach. The agreement is to rework the PR to:
Converting this PR to draft then 🙂 |
pkosiec
changed the title
Support complex regexes for event constraints
Support include/exclude regexes for event and resource constraints
Feb 2, 2023
pkosiec
force-pushed
the
complex-regexes
branch
2 times, most recently
from
February 3, 2023 12:52
478ed3c
to
a65089d
Compare
pkosiec
force-pushed
the
complex-regexes
branch
from
February 3, 2023 14:43
a65089d
to
90970c0
Compare
…resources[].name`
pkosiec
force-pushed
the
complex-regexes
branch
from
February 6, 2023 14:28
90970c0
to
40bcc8f
Compare
pkosiec
force-pushed
the
complex-regexes
branch
from
February 6, 2023 15:56
7bffe42
to
2cb3d22
Compare
pkosiec
force-pushed
the
complex-regexes
branch
from
February 6, 2023 15:58
2cb3d22
to
84800a5
Compare
josefkarasek
approved these changes
Feb 7, 2023
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 👍
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.
Description
Changes proposed in this pull request:
include/exclude
regexes forevent.reason
,event.message
andresources[].name
.Breaking changes
(To copy and paste in #972)
Kubernetes source constraints
event.reason
,event.message
andresources[].name
are now objects with two lists:include
andexclude
. Both take exact values or regex patterns. Exclude takes precedence over include.This allows you to set
exclude
patterns, and also unifies the configuration withnamespaces
constraints.Notes - open question
I didn't rename
namespaces
tonamespace
orevent.types
toevent.type
as I weren't sure if that's a good change. However, if you have any ideas, then please let me know - we're already doing a breaking change here, so I can unify the config properties more 🙂Maybe we should rename
namespaces
tonamespace
for consistency (as it is an object), and keep plural form forevent.types
as it is an array? Let me know 🙂TODO
Testing
Check out the PR (
gh pr checkout 963
).Use the configuration:
Run Botkube:
Run the command to trigger events:
See events with
Readiness probe failed
message:On
priv-channel
, they will be filtered out nicely:Related issue(s)
#954