-
Notifications
You must be signed in to change notification settings - Fork 288
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
update events configured to watch specific fields #228
Conversation
60fb226
to
0e108c9
Compare
Fixing the failed checks, Will Update once done. |
f09a0b9
to
afc4fbf
Compare
Fixed by modifying cmp_test.go |
e438ef5
to
329a7d8
Compare
2df9857
to
2dc3689
Compare
0c45e63
to
889dd2a
Compare
889dd2a
to
e1f2a2b
Compare
@Surbhidongaonkar could you please rebase with develop? |
pkg/utils/cmp.go
Outdated
if !rs.Equal() { | ||
vx, vy := r.path.Last().Values() | ||
path := fmt.Sprintf("%#v", r.path) | ||
if ok := strings.Contains(path, ".Spec."); ok { | ||
if ok := strings.Contains(path, "."+strings.Title(r.field)); ok { |
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.
I think we should support regex/jsonpath here.
Suppose I am interested only in change in container status of Pod, so I can just set status.containerStatuses[*].ready
in updateSetting and that should work.
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.
I have some working code changes for jsonpath on my local repo. I'll cherry-pick the commits and raise a new PR
e1f2a2b
to
8f43633
Compare
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
8f43633
to
f837c56
Compare
@Surbhidongaonkar I have pushed few commit. Can you please refactor diff_test.go accordingly? |
sure! Will do. |
Updated diff_test.go. |
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
ISSUE TYPE
SUMMARY
This commit makes botkube notify about specific field updates. The updates can be in any of the spec, metadata or status.
Botkube should notify about this according to users specifications.
Fixes #203