From 8f8c31e5cfc17029e9f87083dd5965bf84b39ca4 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Thu, 12 Jun 2014 13:20:16 -0700 Subject: [PATCH] Fix localkube due to a bad merge. --- cmd/localkube/localkube.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/localkube/localkube.go b/cmd/localkube/localkube.go index b9c3a79ba66..ab65f21dd0a 100644 --- a/cmd/localkube/localkube.go +++ b/cmd/localkube/localkube.go @@ -23,6 +23,7 @@ import ( "flag" "fmt" "log" + "math/rand" "net/http" "os" "time" @@ -90,8 +91,10 @@ func api_server() { Client: http.DefaultClient, Port: *kubelet_port, } + random := rand.New(rand.NewSource(int64(time.Now().Nanosecond()))) + storage := map[string]apiserver.RESTStorage{ - "pods": registry.MakePodRegistryStorage(podRegistry, containerInfo, registry.MakeFirstFitScheduler(machineList, podRegistry)), + "pods": registry.MakePodRegistryStorage(podRegistry, containerInfo, registry.MakeFirstFitScheduler(machineList, podRegistry, random)), "replicationControllers": registry.MakeControllerRegistryStorage(controllerRegistry), "services": registry.MakeServiceRegistryStorage(serviceRegistry), }