mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Delete dead code in pkg/scheduler.
This deletes some unused functions from the `Configurator` interface.
This commit is contained in:
parent
a77e3bd16b
commit
fbf3d2b84c
@ -78,17 +78,16 @@ func (sched *Scheduler) StopEverything() {
|
|||||||
// construct a new scheduler. An implementation of this can be seen in
|
// construct a new scheduler. An implementation of this can be seen in
|
||||||
// factory.go.
|
// factory.go.
|
||||||
type Configurator interface {
|
type Configurator interface {
|
||||||
GetPriorityFunctionConfigs(priorityKeys sets.String) ([]algorithm.PriorityConfig, error)
|
// Exposed for testing
|
||||||
GetPriorityMetadataProducer() (algorithm.PriorityMetadataProducer, error)
|
|
||||||
GetPredicateMetadataProducer() (algorithm.PredicateMetadataProducer, error)
|
|
||||||
GetPredicates(predicateKeys sets.String) (map[string]algorithm.FitPredicate, error)
|
|
||||||
GetHardPodAffinitySymmetricWeight() int32
|
GetHardPodAffinitySymmetricWeight() int32
|
||||||
GetSchedulerName() string
|
// Exposed for testing
|
||||||
MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue core.SchedulingQueue) func(pod *v1.Pod, err error)
|
MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue core.SchedulingQueue) func(pod *v1.Pod, err error)
|
||||||
|
|
||||||
// Needs to be exposed for things like integration tests where we want to make fake nodes.
|
// Needs to be exposed for things like integration tests where we want to make fake nodes.
|
||||||
GetNodeLister() corelisters.NodeLister
|
GetNodeLister() corelisters.NodeLister
|
||||||
|
// Exposed for testing
|
||||||
GetClient() clientset.Interface
|
GetClient() clientset.Interface
|
||||||
|
// Exposed for testing
|
||||||
GetScheduledPodLister() corelisters.PodLister
|
GetScheduledPodLister() corelisters.PodLister
|
||||||
|
|
||||||
Create() (*Config, error)
|
Create() (*Config, error)
|
||||||
|
@ -17,8 +17,6 @@ limitations under the License.
|
|||||||
package scheduler
|
package scheduler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
clientset "k8s.io/client-go/kubernetes"
|
clientset "k8s.io/client-go/kubernetes"
|
||||||
@ -34,36 +32,11 @@ type FakeConfigurator struct {
|
|||||||
Config *Config
|
Config *Config
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPriorityFunctionConfigs is not implemented yet.
|
|
||||||
func (fc *FakeConfigurator) GetPriorityFunctionConfigs(priorityKeys sets.String) ([]algorithm.PriorityConfig, error) {
|
|
||||||
return nil, fmt.Errorf("not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetPriorityMetadataProducer is not implemented yet.
|
|
||||||
func (fc *FakeConfigurator) GetPriorityMetadataProducer() (algorithm.PriorityMetadataProducer, error) {
|
|
||||||
return nil, fmt.Errorf("not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetPredicateMetadataProducer is not implemented yet.
|
|
||||||
func (fc *FakeConfigurator) GetPredicateMetadataProducer() (algorithm.PredicateMetadataProducer, error) {
|
|
||||||
return nil, fmt.Errorf("not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetPredicates is not implemented yet.
|
|
||||||
func (fc *FakeConfigurator) GetPredicates(predicateKeys sets.String) (map[string]algorithm.FitPredicate, error) {
|
|
||||||
return nil, fmt.Errorf("not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetHardPodAffinitySymmetricWeight is not implemented yet.
|
// GetHardPodAffinitySymmetricWeight is not implemented yet.
|
||||||
func (fc *FakeConfigurator) GetHardPodAffinitySymmetricWeight() int32 {
|
func (fc *FakeConfigurator) GetHardPodAffinitySymmetricWeight() int32 {
|
||||||
panic("not implemented")
|
panic("not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSchedulerName is not implemented yet.
|
|
||||||
func (fc *FakeConfigurator) GetSchedulerName() string {
|
|
||||||
panic("not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// MakeDefaultErrorFunc is not implemented yet.
|
// MakeDefaultErrorFunc is not implemented yet.
|
||||||
func (fc *FakeConfigurator) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue core.SchedulingQueue) func(pod *v1.Pod, err error) {
|
func (fc *FakeConfigurator) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue core.SchedulingQueue) func(pod *v1.Pod, err error) {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user