зеркало из https://github.com/microsoft/KubeGPU.git
Merge branch 're-org' of https://github.com/resouer/kubegpu into resouer-re-org
This commit is contained in:
Коммит
9cca96f2ef
|
@ -12,3 +12,7 @@
|
|||
|
||||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
||||
.glide/
|
||||
|
||||
|
||||
# output folders of binaries
|
||||
_output
|
|
@ -0,0 +1,17 @@
|
|||
BUILD_DIR ?= _output
|
||||
|
||||
.PHONY: all
|
||||
all: clean kube-scheduler crishim
|
||||
|
||||
.PHONY: kube-scheduler
|
||||
kube-scheduler:
|
||||
go build -o ${BUILD_DIR}/kube-scheduler ./kube-scheduler/cmd/scheduler.go
|
||||
|
||||
.PHONY: crishim
|
||||
crishim:
|
||||
go build -o ${BUILD_DIR}/crishim ./crishim/cmd/crishim.go
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf ${BUILD_DIR}/*
|
|
@ -1,51 +0,0 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_binary",
|
||||
"go_library",
|
||||
)
|
||||
load("//pkg/version:def.bzl", "version_x_defs")
|
||||
|
||||
go_binary(
|
||||
name = "kube-scheduler",
|
||||
gc_linkopts = [
|
||||
"-linkmode",
|
||||
"external",
|
||||
"-extldflags",
|
||||
"-static",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/plugin/cmd/kube-scheduler",
|
||||
library = ":go_default_library",
|
||||
x_defs = version_x_defs(),
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["scheduler.go"],
|
||||
importpath = "k8s.io/kubernetes/plugin/cmd/kube-scheduler",
|
||||
deps = [
|
||||
"//pkg/client/metrics/prometheus:go_default_library",
|
||||
"//pkg/version/prometheus:go_default_library",
|
||||
"//plugin/cmd/kube-scheduler/app:go_default_library",
|
||||
"//vendor/github.com/spf13/pflag:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/flag:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//plugin/cmd/kube-scheduler/app:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
)
|
|
@ -1,4 +0,0 @@
|
|||
approvers:
|
||||
- sig-scheduling-maintainers
|
||||
reviewers:
|
||||
- sig-scheduling
|
|
@ -1,66 +0,0 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["server.go"],
|
||||
importpath = "k8s.io/kubernetes/plugin/cmd/kube-scheduler/app",
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/componentconfig:go_default_library",
|
||||
"//pkg/apis/componentconfig/v1alpha1:go_default_library",
|
||||
"//pkg/client/leaderelectionconfig:go_default_library",
|
||||
"//pkg/controller:go_default_library",
|
||||
"//pkg/features:go_default_library",
|
||||
"//pkg/kubectl/cmd/util:go_default_library",
|
||||
"//pkg/master/ports:go_default_library",
|
||||
"//pkg/util/configz:go_default_library",
|
||||
"//pkg/version:go_default_library",
|
||||
"//pkg/version/verflag:go_default_library",
|
||||
"//plugin/pkg/scheduler:go_default_library",
|
||||
"//plugin/pkg/scheduler/algorithmprovider:go_default_library",
|
||||
"//plugin/pkg/scheduler/api:go_default_library",
|
||||
"//plugin/pkg/scheduler/api/latest:go_default_library",
|
||||
"//plugin/pkg/scheduler/factory:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
|
||||
"//vendor/github.com/spf13/cobra:go_default_library",
|
||||
"//vendor/github.com/spf13/pflag:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//vendor/k8s.io/client-go/informers:go_default_library",
|
||||
"//vendor/k8s.io/client-go/informers/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/client-go/informers/storage/v1:go_default_library",
|
||||
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
|
||||
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/leaderelection:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/record:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
|
@ -0,0 +1,83 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/apiserver/pkg/util/flag"
|
||||
"k8s.io/apiserver/pkg/util/logs"
|
||||
kubeletapp "k8s.io/kubernetes/cmd/kubelet/app"
|
||||
"k8s.io/kubernetes/cmd/kubelet/app/options"
|
||||
"k8s.io/kubernetes/pkg/version/verflag"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/crishim/pkg/kubegpucri"
|
||||
)
|
||||
|
||||
// ====================
|
||||
// Main
|
||||
func die(err error) {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func main() {
|
||||
// construct KubeletFlags object and register command line flags mapping
|
||||
kubeletFlags := options.NewKubeletFlags()
|
||||
kubeletFlags.AddFlags(pflag.CommandLine)
|
||||
|
||||
// construct KubeletConfiguration object and register command line flags mapping
|
||||
defaultConfig, err := options.NewKubeletConfiguration()
|
||||
if err != nil {
|
||||
die(err)
|
||||
}
|
||||
options.AddKubeletConfigFlags(pflag.CommandLine, defaultConfig)
|
||||
|
||||
// parse the command line flags into the respective objects
|
||||
flag.InitFlags()
|
||||
|
||||
// initialize logging and defer flush
|
||||
logs.InitLogs()
|
||||
defer logs.FlushLogs()
|
||||
|
||||
// short-circuit on verflag
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
// TODO(mtaufen): won't need this this once dynamic config is GA
|
||||
// set feature gates so we can check if dynamic config is enabled
|
||||
if err := utilfeature.DefaultFeatureGate.SetFromMap(defaultConfig.FeatureGates); err != nil {
|
||||
die(err)
|
||||
}
|
||||
// validate the initial KubeletFlags, to make sure the dynamic-config-related flags aren't used unless the feature gate is on
|
||||
if err := options.ValidateKubeletFlags(kubeletFlags); err != nil {
|
||||
die(err)
|
||||
}
|
||||
// bootstrap the kubelet config controller, app.BootstrapKubeletConfigController will check
|
||||
// feature gates and only turn on relevant parts of the controller
|
||||
kubeletConfig, _, err := kubeletapp.BootstrapKubeletConfigController(
|
||||
defaultConfig, kubeletFlags.InitConfigDir, kubeletFlags.DynamicConfigDir)
|
||||
if err != nil {
|
||||
die(err)
|
||||
}
|
||||
|
||||
// construct a KubeletServer from kubeletFlags and kubeletConfig
|
||||
kubeletServer := &options.KubeletServer{
|
||||
KubeletFlags: *kubeletFlags,
|
||||
KubeletConfiguration: *kubeletConfig,
|
||||
}
|
||||
|
||||
done := make(chan bool)
|
||||
// start the device manager
|
||||
da, err := kubegpucri.StartDeviceManager(kubeletServer, done)
|
||||
if err != nil {
|
||||
die(err)
|
||||
}
|
||||
// run the gpushim
|
||||
if err := kubegpucri.DockerGPUInit(kubeletFlags, kubeletConfig, da.KubeClient, da.DevMgr); err != nil {
|
||||
die(err)
|
||||
}
|
||||
<-done // wait forever
|
||||
done <- true
|
||||
}
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/device"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/device"
|
||||
"github.com/Microsoft/KubeGPU/kubeinterface"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
|
|
@ -1,26 +1,21 @@
|
|||
package main
|
||||
package kubegpucri
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/device"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/device"
|
||||
"github.com/Microsoft/KubeGPU/kubeinterface"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/cri/kubeadvertise"
|
||||
"github.com/Microsoft/KubeGPU/crishim/pkg/kubeadvertise"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
utilnet "k8s.io/apimachinery/pkg/util/net"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/apiserver/pkg/util/flag"
|
||||
"k8s.io/apiserver/pkg/util/logs"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
kubeletapp "k8s.io/kubernetes/cmd/kubelet/app"
|
||||
"k8s.io/kubernetes/cmd/kubelet/app/options"
|
||||
|
@ -32,7 +27,6 @@ import (
|
|||
"k8s.io/kubernetes/pkg/kubelet/server/streaming"
|
||||
kubelettypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
nodeutil "k8s.io/kubernetes/pkg/util/node"
|
||||
"k8s.io/kubernetes/pkg/version/verflag"
|
||||
)
|
||||
|
||||
// implementation of runtime service -- have to implement entire docker service
|
||||
|
@ -59,7 +53,7 @@ func (d *dockerGPUService) modifyContainerConfig(pod *types.PodInfo, cont *types
|
|||
isNvidiaDevice = true
|
||||
numRequestedGPU++
|
||||
}
|
||||
if !isNvidiaDevice || 0==numAllocateFrom {
|
||||
if !isNvidiaDevice || 0 == numAllocateFrom {
|
||||
newDevices = append(newDevices, oldDevice)
|
||||
}
|
||||
}
|
||||
|
@ -243,69 +237,3 @@ func DockerGPUInit(f *options.KubeletFlags, c *kubeletconfig.KubeletConfiguratio
|
|||
return s.ListenAndServe()
|
||||
}
|
||||
}
|
||||
|
||||
// ====================
|
||||
// Main
|
||||
func die(err error) {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func main() {
|
||||
// construct KubeletFlags object and register command line flags mapping
|
||||
kubeletFlags := options.NewKubeletFlags()
|
||||
kubeletFlags.AddFlags(pflag.CommandLine)
|
||||
|
||||
// construct KubeletConfiguration object and register command line flags mapping
|
||||
defaultConfig, err := options.NewKubeletConfiguration()
|
||||
if err != nil {
|
||||
die(err)
|
||||
}
|
||||
options.AddKubeletConfigFlags(pflag.CommandLine, defaultConfig)
|
||||
|
||||
// parse the command line flags into the respective objects
|
||||
flag.InitFlags()
|
||||
|
||||
// initialize logging and defer flush
|
||||
logs.InitLogs()
|
||||
defer logs.FlushLogs()
|
||||
|
||||
// short-circuit on verflag
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
// TODO(mtaufen): won't need this this once dynamic config is GA
|
||||
// set feature gates so we can check if dynamic config is enabled
|
||||
if err := utilfeature.DefaultFeatureGate.SetFromMap(defaultConfig.FeatureGates); err != nil {
|
||||
die(err)
|
||||
}
|
||||
// validate the initial KubeletFlags, to make sure the dynamic-config-related flags aren't used unless the feature gate is on
|
||||
if err := options.ValidateKubeletFlags(kubeletFlags); err != nil {
|
||||
die(err)
|
||||
}
|
||||
// bootstrap the kubelet config controller, app.BootstrapKubeletConfigController will check
|
||||
// feature gates and only turn on relevant parts of the controller
|
||||
kubeletConfig, _, err := kubeletapp.BootstrapKubeletConfigController(
|
||||
defaultConfig, kubeletFlags.InitConfigDir, kubeletFlags.DynamicConfigDir)
|
||||
if err != nil {
|
||||
die(err)
|
||||
}
|
||||
|
||||
// construct a KubeletServer from kubeletFlags and kubeletConfig
|
||||
kubeletServer := &options.KubeletServer{
|
||||
KubeletFlags: *kubeletFlags,
|
||||
KubeletConfiguration: *kubeletConfig,
|
||||
}
|
||||
|
||||
done := make(chan bool)
|
||||
// start the device manager
|
||||
da, err := StartDeviceManager(kubeletServer, done)
|
||||
if err != nil {
|
||||
die(err)
|
||||
}
|
||||
// run the gpushim
|
||||
if err := DockerGPUInit(kubeletFlags, kubeletConfig, da.KubeClient, da.DevMgr); err != nil {
|
||||
die(err)
|
||||
}
|
||||
<-done // wait forever
|
||||
done <- true
|
||||
}
|
|
@ -3,7 +3,7 @@ package device
|
|||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/gpu/nvidia"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/gpu/nvidia"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -3,7 +3,7 @@ package device
|
|||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/gpu/nvidia"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/gpu/nvidia"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -14,7 +14,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/grpalloc"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/grpalloc"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/Microsoft/KubeGPU/utils"
|
||||
"github.com/golang/glog"
|
|
@ -4,7 +4,7 @@ import (
|
|||
"regexp"
|
||||
"strconv"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/grpalloc/resource"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/grpalloc/resource"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/grpalloc/resource"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/grpalloc/resource"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/golang/glog"
|
||||
|
|
@ -3,8 +3,8 @@ package nvidia
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/gpu"
|
||||
"github.com/Microsoft/KubeGPU/grpalloc"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/gpu"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/grpalloc"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -3,8 +3,8 @@ package grpalloc
|
|||
import (
|
||||
"regexp"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/grpalloc/resource"
|
||||
"github.com/Microsoft/KubeGPU/grpalloc/scorer"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/grpalloc/resource"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/grpalloc/scorer"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
"github.com/Microsoft/KubeGPU/utils"
|
||||
"github.com/golang/glog"
|
|
@ -3,7 +3,7 @@ package scorer
|
|||
import (
|
||||
"math"
|
||||
|
||||
resourcefn "github.com/Microsoft/KubeGPU/grpalloc/resource"
|
||||
resourcefn "github.com/Microsoft/KubeGPU/gpuextension/grpalloc/resource"
|
||||
"github.com/Microsoft/KubeGPU/types"
|
||||
)
|
||||
|
|
@ -1 +1 @@
|
|||
find . -name '*.go' -exec sed -i 's?k8s.io/kubernetes/plugin/cmd/kube-scheduler?github.com/KubeGPU/cmd/kube-scheduler?g' {} +
|
||||
find . -name '*.go' -exec sed -i 's?k8s.io/kubernetes/plugin/cmd/kube-scheduler?github.com/KubeGPU/kube-scheduler/cmd?g' {} +
|
||||
|
|
|
@ -1 +1 @@
|
|||
find . -name '*.go' -exec sed -i 's?k8s.io/kubernetes/plugin/pkg/scheduler?github.com/KubeGPU/scheduler?g' {} +
|
||||
find . -name '*.go' -exec sed -i 's?k8s.io/kubernetes/plugin/pkg/scheduler?github.com/KubeGPU/kube-scheduler/pkg?g' {} +
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.PHONY: kube-scheduler
|
||||
kube-scheduler:
|
||||
go build -o ../_output/kube-scheduler ./cmd/scheduler.go
|
|
@ -30,6 +30,10 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithmprovider"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
latestschedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api/latest"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
@ -60,12 +64,8 @@ import (
|
|||
"k8s.io/kubernetes/pkg/util/configz"
|
||||
"k8s.io/kubernetes/pkg/version"
|
||||
"k8s.io/kubernetes/pkg/version/verflag"
|
||||
"github.com/Microsoft/KubeGPU/scheduler"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithmprovider"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
latestschedulerapi "github.com/Microsoft/KubeGPU/scheduler/api/latest"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/scheduler/factory"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/factory"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/cobra"
|
|
@ -22,11 +22,11 @@ import (
|
|||
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/cmd/app"
|
||||
utilflag "k8s.io/apiserver/pkg/util/flag"
|
||||
"k8s.io/apiserver/pkg/util/logs"
|
||||
_ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration
|
||||
_ "k8s.io/kubernetes/pkg/version/prometheus" // for version metric registration
|
||||
"github.com/Microsoft/KubeGPU/cmd/kube-scheduler/app"
|
||||
)
|
||||
|
||||
func main() {
|
|
@ -16,5 +16,4 @@ limitations under the License.
|
|||
|
||||
// Package scheduler contains a generic Scheduler interface and several
|
||||
// implementations.
|
||||
package algorithm // import "github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
|
||||
package algorithm // import "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
|
@ -1,9 +1,9 @@
|
|||
package predicates
|
||||
|
||||
import (
|
||||
"github.com/Microsoft/KubeGPU/device"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/device"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
|
@ -20,11 +20,11 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
schedutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/util"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
schedutil "github.com/Microsoft/KubeGPU/scheduler/util"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -23,6 +23,10 @@ import (
|
|||
"strconv"
|
||||
"sync"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
priorityutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/priorities/util"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
schedutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/util"
|
||||
"k8s.io/api/core/v1"
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
|
@ -39,13 +43,9 @@ import (
|
|||
"k8s.io/kubernetes/pkg/features"
|
||||
kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis"
|
||||
volumeutil "k8s.io/kubernetes/pkg/volume/util"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
priorityutil "github.com/Microsoft/KubeGPU/scheduler/algorithm/priorities/util"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
schedutil "github.com/Microsoft/KubeGPU/scheduler/util"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/volumebinder"
|
||||
"github.com/golang/glog"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/volumebinder"
|
||||
)
|
||||
|
||||
const (
|
|
@ -21,16 +21,16 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
schedulertesting "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/testing"
|
||||
schedutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/util"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
|
||||
kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
schedulertesting "github.com/Microsoft/KubeGPU/scheduler/testing"
|
||||
schedutil "github.com/Microsoft/KubeGPU/scheduler/util"
|
||||
)
|
||||
|
||||
type FakeNodeInfo v1.Node
|
|
@ -21,12 +21,12 @@ import (
|
|||
|
||||
"github.com/golang/glog"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
schedutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/util"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
schedutil "github.com/Microsoft/KubeGPU/scheduler/util"
|
||||
)
|
||||
|
||||
// FindLabelsInSet gets as many key/value pairs as possible out of a label set.
|
|
@ -20,10 +20,10 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
|
||||
priorityutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/priorities/util"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
priorityutil "github.com/Microsoft/KubeGPU/scheduler/algorithm/priorities/util"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -20,11 +20,11 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestBalancedResourceAllocation(t *testing.T) {
|
|
@ -19,9 +19,9 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// ImageLocalityPriorityMap is a priority function that favors nodes that already have requested pod container's images.
|
|
@ -21,10 +21,10 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestImageLocalityPriority(t *testing.T) {
|
|
@ -20,16 +20,16 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/predicates"
|
||||
priorityutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/priorities/util"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm/predicates"
|
||||
priorityutil "github.com/Microsoft/KubeGPU/scheduler/algorithm/priorities/util"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -21,12 +21,12 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
schedulertesting "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/testing"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
schedulertesting "github.com/Microsoft/KubeGPU/scheduler/testing"
|
||||
)
|
||||
|
||||
type FakeNodeListInfo []*v1.Node
|
|
@ -19,9 +19,9 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -20,11 +20,11 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestLeastRequested(t *testing.T) {
|
|
@ -17,11 +17,11 @@ limitations under the License.
|
|||
package priorities
|
||||
|
||||
import (
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
type PriorityMetadataFactory struct {
|
|
@ -20,11 +20,11 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
priorityutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/priorities/util"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
priorityutil "github.com/Microsoft/KubeGPU/scheduler/algorithm/priorities/util"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestPriorityMetadata(t *testing.T) {
|
|
@ -19,9 +19,9 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -20,11 +20,11 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestMostRequested(t *testing.T) {
|
|
@ -19,11 +19,11 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// CalculateNodeAffinityPriority prioritizes nodes according to node affinity scheduling preferences
|
|
@ -20,11 +20,11 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestNodeAffinityPriority(t *testing.T) {
|
|
@ -19,11 +19,11 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
type NodeLabelPrioritizer struct {
|
|
@ -21,10 +21,10 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestNewNodeLabelPriority(t *testing.T) {
|
|
@ -19,11 +19,11 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
priorityutil "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/priorities/util"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
|
||||
priorityutil "github.com/Microsoft/KubeGPU/scheduler/algorithm/priorities/util"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func CalculateNodePreferAvoidPodsPriorityMap(pod *v1.Pod, meta interface{}, nodeInfo *schedulercache.NodeInfo) (schedulerapi.HostPriority, error) {
|
|
@ -21,10 +21,10 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func TestNodePreferAvoidPriority(t *testing.T) {
|
|
@ -17,10 +17,10 @@ limitations under the License.
|
|||
package priorities
|
||||
|
||||
import (
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// NormalizeReduce generates a PriorityReduceFunction that can normalize the result
|
|
@ -19,10 +19,10 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -19,12 +19,12 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
utilnode "k8s.io/kubernetes/pkg/util/node"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
|
@ -21,14 +21,14 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
schedulertesting "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/testing"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
schedulertesting "github.com/Microsoft/KubeGPU/scheduler/testing"
|
||||
)
|
||||
|
||||
func controllerRef(kind, name, uid string) []metav1.OwnerReference {
|
|
@ -19,10 +19,10 @@ package priorities
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// CountIntolerableTaintsPreferNoSchedule gives the count of intolerable taints of a pod with effect PreferNoSchedule
|
|
@ -20,10 +20,10 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func nodeWithTaints(nodeName string, taints []v1.Taint) *v1.Node {
|
|
@ -17,12 +17,12 @@ limitations under the License.
|
|||
package priorities
|
||||
|
||||
import (
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
func makeNode(node string, milliCPU, memory int64) *v1.Node {
|
|
@ -17,9 +17,9 @@ limitations under the License.
|
|||
package algorithm
|
||||
|
||||
import (
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// SchedulerExtender is an interface for external processes to influence scheduling
|
|
@ -17,12 +17,12 @@ limitations under the License.
|
|||
package algorithm
|
||||
|
||||
import (
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
apps "k8s.io/api/apps/v1beta1"
|
||||
"k8s.io/api/core/v1"
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// FitPredicate is a function that indicates if a pod fits into an existing node.
|
|
@ -19,9 +19,9 @@ package algorithm
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// EmptyMetadataProducer should returns a no-op MetadataProducer type.
|
|
@ -23,6 +23,9 @@ import (
|
|||
|
||||
"net/http/httptest"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
latestschedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api/latest"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/factory"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
|
@ -31,9 +34,6 @@ import (
|
|||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
|
||||
informers "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
latestschedulerapi "github.com/Microsoft/KubeGPU/scheduler/api/latest"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/factory"
|
||||
)
|
||||
|
||||
func TestCompatibility_v1_Scheduler(t *testing.T) {
|
|
@ -20,12 +20,12 @@ import (
|
|||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/device"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm/predicates"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm/priorities"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/core"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/factory"
|
||||
"github.com/Microsoft/KubeGPU/gpuextension/device"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/predicates"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/priorities"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/core"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/factory"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
|
||||
"github.com/golang/glog"
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package algorithmprovider
|
||||
|
||||
import (
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithmprovider/defaults"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithmprovider/defaults"
|
||||
)
|
||||
|
||||
// ApplyFeatureGates applies algorithm by feature gates.
|
|
@ -19,7 +19,7 @@ package algorithmprovider
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/scheduler/factory"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/factory"
|
||||
)
|
||||
|
||||
var (
|
|
@ -17,4 +17,4 @@ limitations under the License.
|
|||
// +k8s:deepcopy-gen=package
|
||||
|
||||
// Package api contains scheduler plugin API objects.
|
||||
package api // import "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
package api // import "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
|
@ -17,12 +17,12 @@ limitations under the License.
|
|||
package latest
|
||||
|
||||
import (
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
_ "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer/json"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer/versioning"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
_ "github.com/Microsoft/KubeGPU/scheduler/api/v1"
|
||||
)
|
||||
|
||||
// Version is the string that represents the current external default version.
|
|
@ -17,4 +17,4 @@ limitations under the License.
|
|||
// +k8s:deepcopy-gen=package
|
||||
|
||||
// Package v1 contains scheduler plugin API objects.
|
||||
package v1 // import "github.com/Microsoft/KubeGPU/scheduler/api/v1"
|
||||
package v1 // import "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api/v1"
|
|
@ -17,9 +17,9 @@ limitations under the License.
|
|||
package v1
|
||||
|
||||
import (
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
)
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
|
@ -19,8 +19,8 @@ package validation
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
)
|
||||
|
||||
// ValidatePolicy checks for errors in the Config
|
|
@ -19,7 +19,7 @@ package validation
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
)
|
||||
|
||||
func TestValidatePriorityWithNoWeight(t *testing.T) {
|
|
@ -20,10 +20,10 @@ import (
|
|||
"hash/fnv"
|
||||
"sync"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
hashutil "k8s.io/kubernetes/pkg/util/hash"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/golang/groupcache/lru"
|
|
@ -20,11 +20,11 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm/predicates"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm/predicates"
|
||||
)
|
||||
|
||||
func TestUpdateCachedPredicateItem(t *testing.T) {
|
|
@ -24,12 +24,12 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/kube-scheduler/pkg/api"
|
||||
"github.com/Microsoft/KubeGPU/kube-scheduler/pkg/schedulercache"
|
||||
"k8s.io/api/core/v1"
|
||||
utilnet "k8s.io/apimachinery/pkg/util/net"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/algorithm"
|
||||
schedulerapi "github.com/Microsoft/KubeGPU/scheduler/api"
|
||||
"github.com/Microsoft/KubeGPU/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
const (
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче