Merge pull request #48145 from imcsk8/loadbalancer-logs

Automatic merge from submit-queue (batch tested with PRs 52240, 48145, 52220, 51698, 51777). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Avoid printing node list for LoadBalancer in log file

**What this PR does / why we need it**:  Production log files get saturated with EnsureLoadBalancer messages, this is problematic for sysadmins. 
This patch avoids printing the node list on the AWS logs so the log file is  more readable.
pull/6/head
Kubernetes Submit Queue 2017-09-23 09:13:57 -07:00 committed by GitHub
commit 2b594750e7
1 changed files with 2 additions and 2 deletions

View File

@ -2782,8 +2782,8 @@ func buildListener(port v1.ServicePort, annotations map[string]string, sslPorts
// EnsureLoadBalancer implements LoadBalancer.EnsureLoadBalancer
func (c *Cloud) EnsureLoadBalancer(clusterName string, apiService *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) {
annotations := apiService.Annotations
glog.V(2).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v, %v, %v, %v)",
clusterName, apiService.Namespace, apiService.Name, c.region, apiService.Spec.LoadBalancerIP, apiService.Spec.Ports, nodes, annotations)
glog.V(2).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v, %v, %v)",
clusterName, apiService.Namespace, apiService.Name, c.region, apiService.Spec.LoadBalancerIP, apiService.Spec.Ports, annotations)
if apiService.Spec.SessionAffinity != v1.ServiceAffinityNone {
// ELB supports sticky sessions, but only when configured for HTTP/HTTPS