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
b475cdf7
Commit
b475cdf7
authored
Feb 23, 2019
by
yanghaichao12
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos
change SupportsPreemption change comment again
parent
d6de0454
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
extender.go
pkg/scheduler/core/extender.go
+3
-3
factory.go
pkg/scheduler/factory/factory.go
+1
-1
cache_test.go
pkg/scheduler/internal/cache/cache_test.go
+1
-1
No files found.
pkg/scheduler/core/extender.go
View file @
b475cdf7
...
@@ -114,7 +114,7 @@ func NewHTTPExtender(config *schedulerapi.ExtenderConfig) (algorithm.SchedulerEx
...
@@ -114,7 +114,7 @@ func NewHTTPExtender(config *schedulerapi.ExtenderConfig) (algorithm.SchedulerEx
},
nil
},
nil
}
}
// Name returns extenderURL to identif
ies
the extender.
// Name returns extenderURL to identif
y
the extender.
func
(
h
*
HTTPExtender
)
Name
()
string
{
func
(
h
*
HTTPExtender
)
Name
()
string
{
return
h
.
extenderURL
return
h
.
extenderURL
}
}
...
@@ -125,8 +125,8 @@ func (h *HTTPExtender) IsIgnorable() bool {
...
@@ -125,8 +125,8 @@ func (h *HTTPExtender) IsIgnorable() bool {
return
h
.
ignorable
return
h
.
ignorable
}
}
// SupportsPreemption returns
if a extender support
preemption.
// SupportsPreemption returns
true if an extender supports
preemption.
// A extender should have preempt verb defined and enabled its own node cache.
// A
n
extender should have preempt verb defined and enabled its own node cache.
func
(
h
*
HTTPExtender
)
SupportsPreemption
()
bool
{
func
(
h
*
HTTPExtender
)
SupportsPreemption
()
bool
{
return
len
(
h
.
preemptVerb
)
>
0
return
len
(
h
.
preemptVerb
)
>
0
}
}
...
...
pkg/scheduler/factory/factory.go
View file @
b475cdf7
...
@@ -706,7 +706,7 @@ func MakeDefaultErrorFunc(client clientset.Interface, backoff *util.PodBackoff,
...
@@ -706,7 +706,7 @@ func MakeDefaultErrorFunc(client clientset.Interface, backoff *util.PodBackoff,
}
}
}
}
// nodeEnumerator allows a cache.Poller to enumerate items in a
n
v1.NodeList
// nodeEnumerator allows a cache.Poller to enumerate items in a v1.NodeList
type
nodeEnumerator
struct
{
type
nodeEnumerator
struct
{
*
v1
.
NodeList
*
v1
.
NodeList
}
}
...
...
pkg/scheduler/internal/cache/cache_test.go
View file @
b475cdf7
...
@@ -879,7 +879,7 @@ func TestForgetPod(t *testing.T) {
...
@@ -879,7 +879,7 @@ func TestForgetPod(t *testing.T) {
}
}
// getResourceRequest returns the resource request of all containers in Pods;
// getResourceRequest returns the resource request of all containers in Pods;
// excuding initContainers.
// exc
l
uding initContainers.
func
getResourceRequest
(
pod
*
v1
.
Pod
)
v1
.
ResourceList
{
func
getResourceRequest
(
pod
*
v1
.
Pod
)
v1
.
ResourceList
{
result
:=
&
schedulernodeinfo
.
Resource
{}
result
:=
&
schedulernodeinfo
.
Resource
{}
for
_
,
container
:=
range
pod
.
Spec
.
Containers
{
for
_
,
container
:=
range
pod
.
Spec
.
Containers
{
...
...
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