-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Send events on certain service repair controller errors #54304
Conversation
/ok-to-test |
for i := range list.Items { | ||
svc := &list.Items[i] | ||
ports := service.CollectServiceNodePorts(svc) | ||
for _, svc := range list.Items { |
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.
Please revert - this was done on purpose to avoid unnecessary copies for performance reasons.
@@ -136,6 +145,7 @@ func (c *Repair) runOnce() error { | |||
ip := net.ParseIP(svc.Spec.ClusterIP) | |||
if ip == nil { | |||
// cluster IP is corrupt | |||
c.recorder.Eventf(&svc, v1.EventTypeWarning, "ClusterIPNotValid", "Cluster IP %s is not a valid IP; please recreate service", svc.Spec.ClusterIP) |
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.
@gmarek - in the context of new event API, what is now the policy of adding new events?
I think those are added in this PR are generally useful, but I'm not sure if we should add them in the old API or maybe wait for the new one?
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.
We add them with the old API, as new one doesn't have proper client library implemented yet.
Please squash commits. LGTM. |
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
/lgtm |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frodenas, wojtek-t Associated issue: 54303 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 56308, 54304, 56364, 56388, 55853). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
This PR enables sending events when the api-server service IP and port allocator repair controllers find an error repairing a cluster ip or a port respectively.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #54303Special notes for your reviewer:
In case of an error, events will be emitted every 3 minutes for each failed Service. Even so, event spam protection has been merged (#47367) to mitigate the risk of excessive events.
Release note: