@@ -83,6 +83,9 @@ func (s *ProxyServerConfig) AddFlags(fs *pflag.FlagSet) {
fs.Float32Var(&s.KubeAPIQPS,"kube-api-qps",s.KubeAPIQPS,"QPS to use while talking with kubernetes apiserver")
fs.Int32Var(&s.KubeAPIBurst,"kube-api-burst",s.KubeAPIBurst,"Burst to use while talking with kubernetes apiserver")
fs.DurationVar(&s.UDPIdleTimeout.Duration,"udp-timeout",s.UDPIdleTimeout.Duration,"How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxy-mode=userspace")
fs.Int32Var(&s.ConntrackMax,"conntrack-max",s.ConntrackMax,"Maximum number of NAT connections to track (0 to leave as-is)")
"Maximum number of NAT connections to track per CPU core (0 to leave as-is). This is only considered if conntrack-max is 0.")
fs.DurationVar(&s.ConntrackTCPEstablishedTimeout.Duration,"conntrack-tcp-timeout-established",s.ConntrackTCPEstablishedTimeout.Duration,"Idle timeout for established TCP connections (0 to leave as-is)")
allErrs=append(allErrs,field.Invalid(fldPath.Child("divisor"),rName,fmt.Sprintf("only divisor's values 1m and 1 are supported with the cpu resource")))
allErrs=append(allErrs,field.Invalid(fldPath.Child("divisor"),rName,"only divisor's values 1m and 1 are supported with the cpu resource"))
returnnil,fmt.Errorf("failed to create target pool %s: %v",loadBalancerName,err)
}
iflen(hosts)<=maxTargetPoolCreateInstances{
glog.V(4).Infof("EnsureLoadBalancer(%v(%v)): created target pool",loadBalancerName,serviceName)
glog.Infof("EnsureLoadBalancer(%v(%v)): created target pool",loadBalancerName,serviceName)
}else{
glog.V(4).Infof("EnsureLoadBalancer(%v(%v)): created initial target pool (now updating with %d hosts)",loadBalancerName,serviceName,len(hosts)-maxTargetPoolCreateInstances)
glog.Infof("EnsureLoadBalancer(%v(%v)): created initial target pool (now updating with %d hosts)",loadBalancerName,serviceName,len(hosts)-maxTargetPoolCreateInstances)
glog.Infof("LoadBalancer ip for forwarding rule %v was expected to be %v, but was actually %v",fwd.Name,fwd.IPAddress,loadBalancerIP)
returntrue,true,fwd.IPAddress,nil
}
portRange,err:=loadBalancerPortRange(ports)
iferr!=nil{
returnfalse,false,"",err
// Err on the side of caution in case of errors. Caller should notice the error and retry.
// We never want to end up recreating resources because gce api flaked.
returntrue,false,"",err
}
ifportRange!=fwd.PortRange{
glog.Infof("LoadBalancer port range for forwarding rule %v was expected to be %v, but was actually %v",fwd.Name,fwd.PortRange,portRange)
returntrue,true,fwd.IPAddress,nil
}
// The service controller verified all the protocols match on the ports, just check the first one
ifstring(ports[0].Protocol)!=fwd.IPProtocol{
glog.Infof("LoadBalancer protocol for forwarding rule %v was expected to be %v, but was actually %v",fwd.Name,fwd.IPProtocol,string(ports[0].Protocol))
returntrue,true,fwd.IPAddress,nil
}
...
...
@@ -811,9 +828,20 @@ func (gce *GCECloud) targetPoolNeedsUpdate(name, region string, affinityType api