From 79725246f401d0b8524f4c96bdc09535f3037c68 Mon Sep 17 00:00:00 2001 From: "Timothy St. Clair" Date: Fri, 8 Sep 2017 16:30:31 -0500 Subject: [PATCH] Version gates the ephemeral storage e2e test --- test/e2e/scheduling/BUILD | 1 + test/e2e/scheduling/predicates.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/test/e2e/scheduling/BUILD b/test/e2e/scheduling/BUILD index fbe4c98c5b2..0fbf6e690c6 100644 --- a/test/e2e/scheduling/BUILD +++ b/test/e2e/scheduling/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/api/v1/helper:go_default_library", "//pkg/api/v1/pod:go_default_library", "//pkg/util/system:go_default_library", + "//pkg/util/version:go_default_library", "//plugin/pkg/scheduler/algorithm/priorities/util:go_default_library", "//test/e2e/common:go_default_library", "//test/e2e/framework:go_default_library", diff --git a/test/e2e/scheduling/predicates.go b/test/e2e/scheduling/predicates.go index 11ac2911b00..c6c0a56bdae 100644 --- a/test/e2e/scheduling/predicates.go +++ b/test/e2e/scheduling/predicates.go @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/uuid" clientset "k8s.io/client-go/kubernetes" + utilversion "k8s.io/kubernetes/pkg/util/version" "k8s.io/kubernetes/test/e2e/common" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -40,6 +41,8 @@ import ( const maxNumberOfPods int64 = 10 const minPodCPURequest int64 = 500 +var localStorageVersion = utilversion.MustParseSemantic("v1.8.0-beta.0") + // variable set in BeforeEach, never modified afterwards var masterNodes sets.String @@ -152,6 +155,9 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() { // It assumes that cluster add-on pods stay stable and cannot be run in parallel with any other test that touches Nodes or Pods. // It is so because we need to have precise control on what's running in the cluster. It("validates local ephemeral storage resource limits of pods that are allowed to run [Feature:LocalStorageCapacityIsolation]", func() { + + framework.SkipUnlessServerVersionGTE(localStorageVersion, f.ClientSet.Discovery()) + nodeMaxAllocatable := int64(0) nodeToAllocatableMap := make(map[string]int64)