Change XPN firewall change message, should be required by security admin.

Add l7lbSrcRngsFlag to gce_loadbalancer.go so that ingress can have
fewer source ranges for l7 health checks.
This commit is contained in:
yankaiz
2018-12-03 15:01:25 -08:00
parent a87c1b2d72
commit bd03c3a096
10 changed files with 36 additions and 16 deletions

View File

@@ -75,7 +75,7 @@ func ConstructHealthCheckFirewallForLBService(clusterID string, svc *v1.Service,
fw := compute.Firewall{}
fw.Name = MakeHealthCheckFirewallNameForLBService(clusterID, cloudprovider.DefaultLoadBalancerName(svc), isNodesHealthCheck)
fw.TargetTags = []string{nodeTag}
fw.SourceRanges = gcecloud.LoadBalancerSrcRanges()
fw.SourceRanges = gcecloud.L4LoadBalancerSrcRanges()
healthCheckPort := gcecloud.GetNodesHealthCheckPort()
if !isNodesHealthCheck {
healthCheckPort = svc.Spec.HealthCheckNodePort

View File

@@ -310,10 +310,10 @@ func (p *Provider) cleanupGCEResources(c clientset.Interface, loadBalancerName,
return
}
// LoadBalancerSrcRanges contains the ranges of ips used by the GCE load balancers (l4 & L7)
// for proxying client requests and performing health checks.
func (p *Provider) LoadBalancerSrcRanges() []string {
return gcecloud.LoadBalancerSrcRanges()
// L4LoadBalancerSrcRanges contains the ranges of ips used by the GCE L4 load
// balancers for proxying client requests and performing health checks.
func (p *Provider) L4LoadBalancerSrcRanges() []string {
return gcecloud.L4LoadBalancerSrcRanges()
}
// EnableAndDisableInternalLB returns functions for both enabling and disabling internal Load Balancer