-
Notifications
You must be signed in to change notification settings - Fork 91
Conversation
ScaleUp, ScaleDown and misconfigured time spec events are currently generated Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
This should get coverage back to where it used to be
I'm not sure how to get the coverage any higher. Let me know if you have any concerns with the patch. |
@hjacobs do you see any issues with this PR? I can not get the coverage percentage higher as it is no longer hitting the old exception block on the one failure test for a bad time format since that triggers an event now. |
@gregsidelinger thanks for the PR! Can you make this behavior optional via a command line option? Not everybody might want to have event support (or grant rights to create events). |
@hjacobs I can add a command line switch. Do you want it off or on by default? My vote is on but I like events as its a way for users who do not have access to the logs to get feed back. Especially for misconfigured date/time fields. |
@gregsidelinger I also like events, but this might cause a lot of events for situations where |
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
…nto events Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
@hjacobs I added an --enable-events flag and merged it with your latest changes. I do have it looking up existing events and bumping the last seen timestamp and count for repeated events. While testing I could not find any other way to have the count increment. I'm not sure if there is a better way to do this using pykube. I use kube builder for all other controllers I have worked on and they have an event recorder which seems to take care of that for you. |
Replaced by #127 |
Adding basic event support for #80.
Events on ScaleUp and ScaleDown are generated and show up when describing the object. An event is also generated if the time spec value format is bad. This way users are notified on a bad configuration if they do no have access to the controller logs.