-
Notifications
You must be signed in to change notification settings - Fork 380
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
Fix log spam when there is any DNS based LoadBalancer Service #4234
Conversation
IP in Service.Status.LoadBalancer.Ingress is optional and may be not set for load-balancer ingress points that are DNS based. It should check if the IP is empty before appending it to the slice, otherwise every round of sync will produce one error log "Skipping invalid IP:" for each IP, leading to log spam. The same issue has been fixed in K8s upstream by kubernetes/kubernetes#101690. Signed-off-by: Quan Tian <[email protected]>
@@ -286,8 +289,10 @@ func NewServiceChangeTracker(makeServiceInfo makeServicePortFunc, | |||
// otherwise return false. Update can be used to add/update/delete items of ServiceChangeMap. For example, | |||
// Add item | |||
// - pass <nil, service> as the <previous, current> pair. | |||
// |
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.
The following change is by gofmt, guess related to go1.19.
Codecov Report
@@ Coverage Diff @@
## main #4234 +/- ##
==========================================
+ Coverage 60.34% 64.55% +4.21%
==========================================
Files 385 361 -24
Lines 54456 52188 -2268
==========================================
+ Hits 32862 33691 +829
+ Misses 19130 16052 -3078
+ Partials 2464 2445 -19
*This pull request uses carry forward flags. Click here to find out more.
|
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
/test-all |
…-io#4234) IP in Service.Status.LoadBalancer.Ingress is optional and may be not set for load-balancer ingress points that are DNS based. It should check if the IP is empty before appending it to the slice, otherwise every round of sync will produce one error log "Skipping invalid IP:" for each IP, leading to log spam. The same issue has been fixed in K8s upstream by kubernetes/kubernetes#101690. Signed-off-by: Quan Tian <[email protected]>
IP in Service.Status.LoadBalancer.Ingress is optional and may be not set for load-balancer ingress points that are DNS based. It should check if the IP is empty before appending it to the slice, otherwise every round of sync will produce one error log "Skipping invalid IP:" for each IP, leading to log spam.
The same issue has been fixed in K8s upstream by
kubernetes/kubernetes#101690.
Signed-off-by: Quan Tian [email protected]
Fix #4233