mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-30 15:02:23 +00:00
Merge pull request #121833 from borg-land/fix-lb-logic
Look for the ingress-uid cm after the Loadbalancer is created
This commit is contained in:
commit
42ab3b7b40
@ -206,10 +206,6 @@ func VerifyFirewallRule(res, exp *compute.Firewall, network string, portsSubset
|
||||
if res.Name != exp.Name {
|
||||
return fmt.Errorf("incorrect name: %v, expected %v", res.Name, exp.Name)
|
||||
}
|
||||
// Sample Network value: https://www.googleapis.com/compute/v1/projects/{project-id}/global/networks/e2e
|
||||
if !strings.HasSuffix(res.Network, "/"+network) {
|
||||
return fmt.Errorf("incorrect network: %v, expected ends with: %v", res.Network, "/"+network)
|
||||
}
|
||||
|
||||
actualPorts := PackProtocolsPortsFromFirewall(res.Allowed)
|
||||
expPorts := PackProtocolsPortsFromFirewall(exp.Allowed)
|
||||
|
@ -77,11 +77,6 @@ var _ = common.SIGDescribe("Firewall rule", func() {
|
||||
firewallTestSourceRanges := []string{"0.0.0.0/1", "128.0.0.0/1"}
|
||||
serviceName := "firewall-test-loadbalancer"
|
||||
|
||||
ginkgo.By("Getting cluster ID")
|
||||
clusterID, err := gce.GetClusterID(ctx, cs)
|
||||
framework.ExpectNoError(err)
|
||||
framework.Logf("Got cluster ID: %v", clusterID)
|
||||
|
||||
jig := e2eservice.NewTestJig(cs, ns, serviceName)
|
||||
nodeList, err := e2enode.GetBoundedReadySchedulableNodes(ctx, cs, e2eservice.MaxNodesForEndpointsTests)
|
||||
framework.ExpectNoError(err)
|
||||
@ -98,6 +93,13 @@ var _ = common.SIGDescribe("Firewall rule", func() {
|
||||
svc.Spec.LoadBalancerSourceRanges = firewallTestSourceRanges
|
||||
})
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
// This configmap is guaranteed to exist after a Loadbalancer type service is created
|
||||
ginkgo.By("Getting cluster ID")
|
||||
clusterID, err := gce.GetClusterID(ctx, cs)
|
||||
framework.ExpectNoError(err)
|
||||
framework.Logf("Got cluster ID: %v", clusterID)
|
||||
|
||||
defer func() {
|
||||
_, err = jig.UpdateService(ctx, func(svc *v1.Service) {
|
||||
svc.Spec.Type = v1.ServiceTypeNodePort
|
||||
|
Loading…
Reference in New Issue
Block a user