Commit 0420c8f0 authored by sakeven's avatar sakeven

[Scheduler] regroup packages

Signed-off-by: 's avatarsakeven <jc5930@sina.cn>
parent 4457e43e
......@@ -18,13 +18,15 @@ package predicates
import (
"fmt"
"github.com/golang/glog"
"sync"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
schedutil "k8s.io/kubernetes/plugin/pkg/scheduler/util"
"sync"
"github.com/golang/glog"
)
type PredicateMetadataFactory struct {
......
......@@ -23,7 +23,6 @@ import (
"sync"
"time"
"github.com/golang/glog"
"k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
......@@ -42,6 +41,8 @@ import (
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
schedutil "k8s.io/kubernetes/plugin/pkg/scheduler/util"
"k8s.io/metrics/pkg/client/clientset_generated/clientset"
"github.com/golang/glog"
)
// NodeInfo: Other types for predicate functions...
......
......@@ -20,7 +20,6 @@ import (
"strings"
"sync"
"github.com/golang/glog"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/util/workqueue"
......@@ -30,6 +29,8 @@ import (
priorityutil "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/util"
schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
"github.com/golang/glog"
)
type InterPodAffinity struct {
......
......@@ -19,12 +19,13 @@ package priorities
import (
"fmt"
"github.com/golang/glog"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
"github.com/golang/glog"
)
// CalculateNodeAffinityPriority prioritizes nodes according to node affinity scheduling preferences
......
......@@ -19,7 +19,6 @@ package priorities
import (
"sync"
"github.com/golang/glog"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
......@@ -28,6 +27,8 @@ import (
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm"
schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
"github.com/golang/glog"
)
// When zone information is present, give 2/3 of the weighting to zone spreading, 1/3 to node spreading
......
......@@ -19,11 +19,12 @@ package priorities
import (
"fmt"
"github.com/golang/glog"
"k8s.io/api/core/v1"
v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
"github.com/golang/glog"
)
// CountIntolerableTaintsPreferNoSchedule gives the count of intolerable taints of a pod with effect PreferNoSchedule
......
......@@ -18,11 +18,10 @@ package defaults
import (
"fmt"
"net/http/httptest"
"reflect"
"testing"
"net/http/httptest"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/sets"
......
......@@ -24,7 +24,6 @@ import (
"sync/atomic"
"time"
"github.com/golang/glog"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/errors"
utiltrace "k8s.io/apiserver/pkg/util/trace"
......@@ -33,6 +32,8 @@ import (
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates"
schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
"github.com/golang/glog"
)
type FailedPredicateMap map[string][]algorithm.PredicateFailureReason
......
......@@ -23,7 +23,6 @@ import (
"reflect"
"time"
"github.com/golang/glog"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
......@@ -52,6 +51,8 @@ import (
"k8s.io/kubernetes/plugin/pkg/scheduler/core"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
"k8s.io/kubernetes/plugin/pkg/scheduler/util"
"github.com/golang/glog"
)
const (
......
......@@ -23,12 +23,13 @@ import (
"strings"
"sync"
"github.com/golang/glog"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm"
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates"
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities"
schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api"
"github.com/golang/glog"
)
// PluginFactoryArgs are passed to all plugin factory functions.
......
......@@ -17,9 +17,10 @@ limitations under the License.
package factory
import (
"testing"
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm"
"k8s.io/kubernetes/plugin/pkg/scheduler/api"
"testing"
)
func TestAlgorithmNameValidation(t *testing.T) {
......
......@@ -21,10 +21,11 @@ import (
"sync"
"time"
"github.com/golang/glog"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/wait"
"github.com/golang/glog"
)
var (
......
......@@ -22,8 +22,9 @@ import (
"sync/atomic"
"time"
"github.com/golang/glog"
ktypes "k8s.io/apimachinery/pkg/types"
"github.com/golang/glog"
)
type clock interface {
......
......@@ -17,9 +17,10 @@ limitations under the License.
package util
import (
ktypes "k8s.io/apimachinery/pkg/types"
"testing"
"time"
ktypes "k8s.io/apimachinery/pkg/types"
)
type fakeClock struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment