Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fbf3d2b8
Commit
fbf3d2b8
authored
Aug 15, 2018
by
Jonathan Basseri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete dead code in pkg/scheduler.
This deletes some unused functions from the `Configurator` interface.
parent
a77e3bd1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
32 deletions
+4
-32
scheduler.go
pkg/scheduler/scheduler.go
+4
-5
testutil.go
pkg/scheduler/testutil.go
+0
-27
No files found.
pkg/scheduler/scheduler.go
View file @
fbf3d2b8
...
@@ -78,17 +78,16 @@ func (sched *Scheduler) StopEverything() {
...
@@ -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
()
str
ing
// Exposed for test
ing
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
)
...
...
pkg/scheduler/testutil.go
View file @
fbf3d2b8
...
@@ -17,8 +17,6 @@ limitations under the License.
...
@@ -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 {
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment