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
dda3b01d
Commit
dda3b01d
authored
Jan 10, 2017
by
Anirudh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove special case for StatefulSets in scheduler
parent
3683e0a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
defaults.go
plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go
+1
-12
No files found.
plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go
View file @
dda3b01d
...
...
@@ -238,7 +238,7 @@ func GetEquivalencePod(pod *v1.Pod) interface{} {
// to be equivalent
if
len
(
pod
.
OwnerReferences
)
!=
0
{
for
_
,
ref
:=
range
pod
.
OwnerReferences
{
if
*
ref
.
Controller
&&
isValidControllerKind
(
ref
.
Kind
)
{
if
*
ref
.
Controller
{
equivalencePod
.
ControllerRef
=
ref
// a pod can only belongs to one controller
break
...
...
@@ -248,17 +248,6 @@ func GetEquivalencePod(pod *v1.Pod) interface{} {
return
&
equivalencePod
}
// isValidControllerKind checks if a given controller's kind can be applied to equivalence pod algorithm.
func
isValidControllerKind
(
kind
string
)
bool
{
switch
kind
{
// list of kinds that we cannot handle
case
StatefulSetKind
:
return
false
default
:
return
true
}
}
// EquivalencePod is a group of pod attributes which can be reused as equivalence to schedule other pods.
type
EquivalencePod
struct
{
ControllerRef
metav1
.
OwnerReference
...
...
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