Vendor: Update k8s version
Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
parent
dfa93414c5
commit
52baf68d50
3756 changed files with 113013 additions and 92675 deletions
5
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/BUILD
generated
vendored
5
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/BUILD
generated
vendored
|
@ -18,12 +18,12 @@ go_library(
|
|||
"//pkg/client/clientset_generated/clientset:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library",
|
||||
"//pkg/client/record:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//plugin/pkg/scheduler:go_default_library",
|
||||
"//plugin/pkg/scheduler/algorithmprovider:go_default_library",
|
||||
"//plugin/pkg/scheduler/factory:go_default_library",
|
||||
"//test/integration/framework:go_default_library",
|
||||
"//vendor:github.com/golang/glog",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -37,11 +37,12 @@ go_test(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//plugin/pkg/scheduler/factory:go_default_library",
|
||||
"//plugin/pkg/scheduler:go_default_library",
|
||||
"//test/integration/framework:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//vendor:github.com/golang/glog",
|
||||
"//vendor:github.com/renstrom/dedent",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
6
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_bench_test.go
generated
vendored
6
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_bench_test.go
generated
vendored
|
@ -56,7 +56,7 @@ func BenchmarkScheduling1000Nodes1000Pods(b *testing.B) {
|
|||
func benchmarkScheduling(numNodes, numScheduledPods int, b *testing.B) {
|
||||
schedulerConfigFactory, finalFunc := mustSetupScheduler()
|
||||
defer finalFunc()
|
||||
c := schedulerConfigFactory.Client
|
||||
c := schedulerConfigFactory.GetClient()
|
||||
|
||||
nodePreparer := framework.NewIntegrationTestNodePreparer(
|
||||
c,
|
||||
|
@ -74,7 +74,7 @@ func benchmarkScheduling(numNodes, numScheduledPods int, b *testing.B) {
|
|||
podCreator.CreatePods()
|
||||
|
||||
for {
|
||||
scheduled := schedulerConfigFactory.ScheduledPodLister.Indexer.List()
|
||||
scheduled := schedulerConfigFactory.GetScheduledPodListerIndexer().List()
|
||||
if len(scheduled) >= numScheduledPods {
|
||||
break
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ func benchmarkScheduling(numNodes, numScheduledPods int, b *testing.B) {
|
|||
for {
|
||||
// This can potentially affect performance of scheduler, since List() is done under mutex.
|
||||
// TODO: Setup watch on apiserver and wait until all pods scheduled.
|
||||
scheduled := schedulerConfigFactory.ScheduledPodLister.Indexer.List()
|
||||
scheduled := schedulerConfigFactory.GetScheduledPodListerIndexer().List()
|
||||
if len(scheduled) >= numScheduledPods+b.N {
|
||||
break
|
||||
}
|
||||
|
|
33
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_test.go
generated
vendored
33
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_test.go
generated
vendored
|
@ -22,13 +22,14 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler/factory"
|
||||
"k8s.io/kubernetes/test/integration/framework"
|
||||
testutils "k8s.io/kubernetes/test/utils"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/renstrom/dedent"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -73,7 +74,7 @@ func TestSchedule100Node3KNodeAffinityPods(t *testing.T) {
|
|||
})
|
||||
}
|
||||
config.nodePreparer = framework.NewIntegrationTestNodePreparer(
|
||||
config.schedulerConfigFactory.Client,
|
||||
config.schedulerSupportFunctions.GetClient(),
|
||||
nodeStrategies,
|
||||
"scheduler-perf-",
|
||||
)
|
||||
|
@ -97,7 +98,7 @@ func TestSchedule100Node3KNodeAffinityPods(t *testing.T) {
|
|||
for i := 0; i < numGroups; i++ {
|
||||
podCreatorConfig.AddStrategy("sched-perf-node-affinity", config.numPods/numGroups,
|
||||
testutils.NewCustomCreatePodStrategy(&v1.Pod{
|
||||
ObjectMeta: v1.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
GenerateName: "sched-perf-node-affinity-pod-",
|
||||
Annotations: map[string]string{v1.AffinityAnnotationKey: fmt.Sprintf(affinityTemplate, i)},
|
||||
},
|
||||
|
@ -105,7 +106,7 @@ func TestSchedule100Node3KNodeAffinityPods(t *testing.T) {
|
|||
}),
|
||||
)
|
||||
}
|
||||
config.podCreator = testutils.NewTestPodCreator(config.schedulerConfigFactory.Client, podCreatorConfig)
|
||||
config.podCreator = testutils.NewTestPodCreator(config.schedulerSupportFunctions.GetClient(), podCreatorConfig)
|
||||
|
||||
if min := schedulePods(config); min < threshold30K {
|
||||
t.Errorf("Too small pod scheduling throughput for 30k pods. Expected %v got %v", threshold30K, min)
|
||||
|
@ -143,19 +144,19 @@ func TestSchedule1000Node30KPods(t *testing.T) {
|
|||
// }
|
||||
|
||||
type testConfig struct {
|
||||
numPods int
|
||||
numNodes int
|
||||
nodePreparer testutils.TestNodePreparer
|
||||
podCreator *testutils.TestPodCreator
|
||||
schedulerConfigFactory *factory.ConfigFactory
|
||||
destroyFunc func()
|
||||
numPods int
|
||||
numNodes int
|
||||
nodePreparer testutils.TestNodePreparer
|
||||
podCreator *testutils.TestPodCreator
|
||||
schedulerSupportFunctions scheduler.Configurator
|
||||
destroyFunc func()
|
||||
}
|
||||
|
||||
func baseConfig() *testConfig {
|
||||
schedulerConfigFactory, destroyFunc := mustSetupScheduler()
|
||||
return &testConfig{
|
||||
schedulerConfigFactory: schedulerConfigFactory,
|
||||
destroyFunc: destroyFunc,
|
||||
schedulerSupportFunctions: schedulerConfigFactory,
|
||||
destroyFunc: destroyFunc,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,14 +164,14 @@ func defaultSchedulerBenchmarkConfig(numNodes, numPods int) *testConfig {
|
|||
baseConfig := baseConfig()
|
||||
|
||||
nodePreparer := framework.NewIntegrationTestNodePreparer(
|
||||
baseConfig.schedulerConfigFactory.Client,
|
||||
baseConfig.schedulerSupportFunctions.GetClient(),
|
||||
[]testutils.CountToStrategy{{Count: numNodes, Strategy: &testutils.TrivialNodePrepareStrategy{}}},
|
||||
"scheduler-perf-",
|
||||
)
|
||||
|
||||
config := testutils.NewTestPodCreatorConfig()
|
||||
config.AddStrategy("sched-test", numPods, testutils.NewSimpleWithControllerCreatePodStrategy("rc1"))
|
||||
podCreator := testutils.NewTestPodCreator(baseConfig.schedulerConfigFactory.Client, config)
|
||||
podCreator := testutils.NewTestPodCreator(baseConfig.schedulerSupportFunctions.GetClient(), config)
|
||||
|
||||
baseConfig.nodePreparer = nodePreparer
|
||||
baseConfig.podCreator = podCreator
|
||||
|
@ -202,7 +203,7 @@ func schedulePods(config *testConfig) int32 {
|
|||
// Bake in time for the first pod scheduling event.
|
||||
for {
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
scheduled := config.schedulerConfigFactory.ScheduledPodLister.Indexer.List()
|
||||
scheduled := config.schedulerSupportFunctions.GetScheduledPodListerIndexer().List()
|
||||
// 30,000 pods -> wait till @ least 300 are scheduled to start measuring.
|
||||
// TODO Find out why sometimes there may be scheduling blips in the beggining.
|
||||
if len(scheduled) > config.numPods/100 {
|
||||
|
@ -217,7 +218,7 @@ func schedulePods(config *testConfig) int32 {
|
|||
// This can potentially affect performance of scheduler, since List() is done under mutex.
|
||||
// Listing 10000 pods is an expensive operation, so running it frequently may impact scheduler.
|
||||
// TODO: Setup watch on apiserver and wait until all pods scheduled.
|
||||
scheduled := config.schedulerConfigFactory.ScheduledPodLister.Indexer.List()
|
||||
scheduled := config.schedulerSupportFunctions.GetScheduledPodListerIndexer().List()
|
||||
|
||||
// We will be completed when all pods are done being scheduled.
|
||||
// return the worst-case-scenario interval that was seen during this time.
|
||||
|
|
4
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/util.go
generated
vendored
4
vendor/k8s.io/kubernetes/test/integration/scheduler_perf/util.go
generated
vendored
|
@ -21,12 +21,12 @@ import (
|
|||
"net/http/httptest"
|
||||
|
||||
"github.com/golang/glog"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
|
||||
v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
|
||||
"k8s.io/kubernetes/pkg/client/record"
|
||||
"k8s.io/kubernetes/pkg/client/restclient"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler"
|
||||
_ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler/factory"
|
||||
|
@ -40,7 +40,7 @@ import (
|
|||
// remove resources after finished.
|
||||
// Notes on rate limiter:
|
||||
// - client rate limit is set to 5000.
|
||||
func mustSetupScheduler() (schedulerConfigFactory *factory.ConfigFactory, destroyFunc func()) {
|
||||
func mustSetupScheduler() (schedulerConfigFactory scheduler.Configurator, destroyFunc func()) {
|
||||
|
||||
h := &framework.MasterHolder{Initialized: make(chan struct{})}
|
||||
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue