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
4c12c76a
Commit
4c12c76a
authored
Apr 10, 2019
by
caiweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up unused code
parent
a2c200a5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 addition
and
23 deletions
+1
-23
eventhandlers.go
pkg/scheduler/eventhandlers.go
+0
-6
scheduler.go
pkg/scheduler/scheduler.go
+1
-1
daemonset_test.go
test/integration/daemonset/daemonset_test.go
+0
-4
scheduler_test.go
test/integration/scheduler/scheduler_test.go
+0
-4
util.go
test/integration/scheduler/util.go
+0
-4
util.go
test/integration/util/util.go
+0
-4
No files found.
pkg/scheduler/eventhandlers.go
View file @
4c12c76a
...
...
@@ -24,9 +24,7 @@ import (
"k8s.io/api/core/v1"
storagev1
"k8s.io/api/storage/v1"
utilruntime
"k8s.io/apimachinery/pkg/util/runtime"
appsinformers
"k8s.io/client-go/informers/apps/v1"
coreinformers
"k8s.io/client-go/informers/core/v1"
policyinformers
"k8s.io/client-go/informers/policy/v1beta1"
storageinformers
"k8s.io/client-go/informers/storage/v1"
"k8s.io/client-go/tools/cache"
)
...
...
@@ -325,11 +323,7 @@ func AddAllEventHandlers(
podInformer
coreinformers
.
PodInformer
,
pvInformer
coreinformers
.
PersistentVolumeInformer
,
pvcInformer
coreinformers
.
PersistentVolumeClaimInformer
,
replicationControllerInformer
coreinformers
.
ReplicationControllerInformer
,
replicaSetInformer
appsinformers
.
ReplicaSetInformer
,
statefulSetInformer
appsinformers
.
StatefulSetInformer
,
serviceInformer
coreinformers
.
ServiceInformer
,
pdbInformer
policyinformers
.
PodDisruptionBudgetInformer
,
storageClassInformer
storageinformers
.
StorageClassInformer
,
)
{
// scheduled pod cache
...
...
pkg/scheduler/scheduler.go
View file @
4c12c76a
...
...
@@ -196,7 +196,7 @@ func New(client clientset.Interface,
// Create the scheduler.
sched
:=
NewFromConfig
(
config
)
AddAllEventHandlers
(
sched
,
options
.
schedulerName
,
nodeInformer
,
podInformer
,
pvInformer
,
pvcInformer
,
replicationControllerInformer
,
replicaSetInformer
,
statefulSetInformer
,
serviceInformer
,
pdb
Informer
,
storageClassInformer
)
AddAllEventHandlers
(
sched
,
options
.
schedulerName
,
nodeInformer
,
podInformer
,
pvInformer
,
pvcInformer
,
service
Informer
,
storageClassInformer
)
return
sched
,
nil
}
...
...
test/integration/daemonset/daemonset_test.go
View file @
4c12c76a
...
...
@@ -130,11 +130,7 @@ func setupScheduler(
informerFactory
.
Core
()
.
V1
()
.
Pods
(),
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumes
(),
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumeClaims
(),
informerFactory
.
Core
()
.
V1
()
.
ReplicationControllers
(),
informerFactory
.
Apps
()
.
V1
()
.
ReplicaSets
(),
informerFactory
.
Apps
()
.
V1
()
.
StatefulSets
(),
informerFactory
.
Core
()
.
V1
()
.
Services
(),
informerFactory
.
Policy
()
.
V1beta1
()
.
PodDisruptionBudgets
(),
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
)
...
...
test/integration/scheduler/scheduler_test.go
View file @
4c12c76a
...
...
@@ -611,11 +611,7 @@ func TestMultiScheduler(t *testing.T) {
podInformer2
,
context
.
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumes
(),
context
.
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumeClaims
(),
context
.
informerFactory
.
Core
()
.
V1
()
.
ReplicationControllers
(),
context
.
informerFactory
.
Apps
()
.
V1
()
.
ReplicaSets
(),
context
.
informerFactory
.
Apps
()
.
V1
()
.
StatefulSets
(),
context
.
informerFactory
.
Core
()
.
V1
()
.
Services
(),
context
.
informerFactory
.
Policy
()
.
V1beta1
()
.
PodDisruptionBudgets
(),
context
.
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
)
...
...
test/integration/scheduler/util.go
View file @
4c12c76a
...
...
@@ -198,11 +198,7 @@ func initTestSchedulerWithOptions(
podInformer
,
context
.
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumes
(),
context
.
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumeClaims
(),
context
.
informerFactory
.
Core
()
.
V1
()
.
ReplicationControllers
(),
context
.
informerFactory
.
Apps
()
.
V1
()
.
ReplicaSets
(),
context
.
informerFactory
.
Apps
()
.
V1
()
.
StatefulSets
(),
context
.
informerFactory
.
Core
()
.
V1
()
.
Services
(),
context
.
informerFactory
.
Policy
()
.
V1beta1
()
.
PodDisruptionBudgets
(),
context
.
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
)
...
...
test/integration/util/util.go
View file @
4c12c76a
...
...
@@ -82,11 +82,7 @@ func StartScheduler(clientSet clientset.Interface) (factory.Configurator, Shutdo
informerFactory
.
Core
()
.
V1
()
.
Pods
(),
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumes
(),
informerFactory
.
Core
()
.
V1
()
.
PersistentVolumeClaims
(),
informerFactory
.
Core
()
.
V1
()
.
ReplicationControllers
(),
informerFactory
.
Apps
()
.
V1
()
.
ReplicaSets
(),
informerFactory
.
Apps
()
.
V1
()
.
StatefulSets
(),
informerFactory
.
Core
()
.
V1
()
.
Services
(),
informerFactory
.
Policy
()
.
V1beta1
()
.
PodDisruptionBudgets
(),
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
)
...
...
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