Merge pull request #54248 from MrHohn/gcp-ilb-skip-large-cluster

Automatic merge from submit-queue (batch tested with PRs 52794, 54243, 54248, 53491, 53841). 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>.

Skip ILB e2e test on GCP if cluster size exceeds limit

**What this PR does / why we need it**: Ack https://github.com/kubernetes/kubernetes/issues/52495#issuecomment-337293615, ILB test will fail on large cluster.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: xref https://github.com/kubernetes/kubernetes/issues/52495

**Special notes for your reviewer**:
/assign @nicksardo @bowei 
cc @shyamjvs 

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-10-19 16:27:10 -07:00 committed by GitHub
commit 34d5f40dde
2 changed files with 11 additions and 0 deletions

View File

@ -89,6 +89,10 @@ const (
// ServiceTestTimeout is used for most polling/waiting activities
ServiceTestTimeout = 60 * time.Second
// GCPMaxInstancesInInstanceGroup is the maximum number of instances supported in
// one instance group on GCP.
GCPMaxInstancesInInstanceGroup = 2000
)
// This should match whatever the default/configured range is

View File

@ -1339,8 +1339,15 @@ var _ = SIGDescribe("Services", func() {
It("should be able to create an internal type load balancer [Slow]", func() {
framework.SkipUnlessProviderIs("azure", "gke", "gce")
if framework.ProviderIs("gke", "gce") {
framework.SkipUnlessNodeCountIsAtMost(framework.GCPMaxInstancesInInstanceGroup)
}
createTimeout := framework.LoadBalancerCreateTimeoutDefault
if nodes := framework.GetReadySchedulableNodesOrDie(cs); len(nodes.Items) > framework.LargeClusterMinNodesNumber {
createTimeout = framework.LoadBalancerCreateTimeoutLarge
}
pollInterval := framework.Poll * 10
namespace := f.Namespace.Name