mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-30 21:30:16 +00:00 
			
		
		
		
	Merge pull request #38643 from bprashanth/ing_avoid_nodeport
Automatic merge from submit-queue Don't check nodeport for nginx ingress Services behind a standard nginx ingress don't need nodeport, so don't check that.
This commit is contained in:
		| @@ -115,7 +115,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { | ||||
| 				By(t.entryLog) | ||||
| 				t.execute() | ||||
| 				By(t.exitLog) | ||||
| 				jig.waitForIngress() | ||||
| 				jig.waitForIngress(true) | ||||
| 			} | ||||
| 		}) | ||||
|  | ||||
| @@ -197,7 +197,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { | ||||
| 				By(t.entryLog) | ||||
| 				t.execute() | ||||
| 				By(t.exitLog) | ||||
| 				jig.waitForIngress() | ||||
| 				jig.waitForIngress(false) | ||||
| 			} | ||||
| 		}) | ||||
| 	}) | ||||
|   | ||||
| @@ -838,7 +838,12 @@ func (j *testJig) deleteIngress() { | ||||
| 	framework.ExpectNoError(j.client.Extensions().Ingresses(j.ing.Namespace).Delete(j.ing.Name, nil)) | ||||
| } | ||||
|  | ||||
| func (j *testJig) waitForIngress() { | ||||
| // waitForIngress waits till the ingress acquires an IP, then waits for its | ||||
| // hosts/urls to respond to a protocol check (either http or https). If | ||||
| // waitForNodePort is true, the NodePort of the Service is verified before | ||||
| // verifying the Ingress. NodePort is currently a requirement for cloudprovider | ||||
| // Ingress. | ||||
| func (j *testJig) waitForIngress(waitForNodePort bool) { | ||||
| 	// Wait for the loadbalancer IP. | ||||
| 	address, err := framework.WaitForIngressAddress(j.client, j.ing.Namespace, j.ing.Name, lbPollTimeout) | ||||
| 	if err != nil { | ||||
| @@ -860,7 +865,9 @@ func (j *testJig) waitForIngress() { | ||||
| 			} | ||||
| 		} | ||||
| 		for _, p := range rules.IngressRuleValue.HTTP.Paths { | ||||
| 			if waitForNodePort { | ||||
| 				j.curlServiceNodePort(j.ing.Namespace, p.Backend.ServiceName, int(p.Backend.ServicePort.IntVal)) | ||||
| 			} | ||||
| 			route := fmt.Sprintf("%v://%v%v", proto, address, p.Path) | ||||
| 			framework.Logf("Testing route %v host %v with simple GET", route, rules.Host) | ||||
| 			framework.ExpectNoError(pollURL(route, rules.Host, lbPollTimeout, j.pollInterval, timeoutClient, false)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user