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
19b6c85f
Commit
19b6c85f
authored
Mar 12, 2015
by
Brian Grant
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5363 from wojtek-t/no_bound_pods_in_scheduler
Make scheduler to watch PodSpec.Host instead Status.Host
parents
c0b8dc50
9f2f10d6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
13 deletions
+12
-13
conversion.go
pkg/api/v1beta1/conversion.go
+1
-1
conversion.go
pkg/api/v1beta2/conversion.go
+1
-1
conversion.go
pkg/api/v1beta3/conversion.go
+1
-1
resthandler.go
pkg/apiserver/resthandler.go
+0
-1
listwatch_test.go
pkg/client/cache/listwatch_test.go
+1
-1
apiserver.go
pkg/kubelet/config/apiserver.go
+1
-1
etcd_test.go
pkg/registry/pod/etcd/etcd_test.go
+4
-4
rest.go
pkg/registry/pod/rest.go
+1
-1
factory.go
plugin/pkg/scheduler/factory/factory.go
+2
-2
No files found.
pkg/api/v1beta1/conversion.go
View file @
19b6c85f
...
...
@@ -1384,7 +1384,7 @@ func init() {
case
"name"
:
return
"name"
,
value
,
nil
case
"DesiredState.Host"
:
return
"s
tatus
.host"
,
value
,
nil
return
"s
pec
.host"
,
value
,
nil
case
"DesiredState.Status"
:
podStatus
:=
PodStatus
(
value
)
var
internalValue
newer
.
PodPhase
...
...
pkg/api/v1beta2/conversion.go
View file @
19b6c85f
...
...
@@ -1300,7 +1300,7 @@ func init() {
case
"name"
:
return
"name"
,
value
,
nil
case
"DesiredState.Host"
:
return
"s
tatus
.host"
,
value
,
nil
return
"s
pec
.host"
,
value
,
nil
case
"DesiredState.Status"
:
podStatus
:=
PodStatus
(
value
)
var
internalValue
newer
.
PodPhase
...
...
pkg/api/v1beta3/conversion.go
View file @
19b6c85f
...
...
@@ -31,7 +31,7 @@ func init() {
fallthrough
case
"status.phase"
:
fallthrough
case
"s
tatus
.host"
:
case
"s
pec
.host"
:
return
label
,
value
,
nil
default
:
return
""
,
""
,
fmt
.
Errorf
(
"field label not supported: %s"
,
label
)
...
...
pkg/apiserver/resthandler.go
View file @
19b6c85f
...
...
@@ -194,7 +194,6 @@ func CreateResource(r RESTCreater, ctxFn ContextFunc, namer ScopeNamer, codec ru
func
PatchResource
(
r
RESTPatcher
,
ctxFn
ContextFunc
,
namer
ScopeNamer
,
codec
runtime
.
Codec
,
typer
runtime
.
ObjectTyper
,
resource
string
,
admit
admission
.
Interface
)
restful
.
RouteFunction
{
return
func
(
req
*
restful
.
Request
,
res
*
restful
.
Response
)
{
w
:=
res
.
ResponseWriter
glog
.
Infof
(
"hi"
)
// TODO: we either want to remove timeout or document it (if we document, move timeout out of this function and declare it in api_installer)
timeout
:=
parseTimeout
(
req
.
Request
.
URL
.
Query
()
.
Get
(
"timeout"
))
...
...
pkg/client/cache/listwatch_test.go
View file @
19b6c85f
...
...
@@ -53,7 +53,7 @@ func getHostFieldLabel() string {
case
"v1beta1"
,
"v1beta2"
:
return
"DesiredState.Host"
default
:
return
"s
tatus
.host"
return
"s
pec
.host"
}
}
...
...
pkg/kubelet/config/apiserver.go
View file @
19b6c85f
...
...
@@ -57,6 +57,6 @@ func getHostFieldLabel(apiVersion string) string {
case
"v1beta1"
,
"v1beta2"
:
return
"DesiredState.Host"
default
:
return
"s
tatus
.host"
return
"s
pec
.host"
}
}
pkg/registry/pod/etcd/etcd_test.go
View file @
19b6c85f
...
...
@@ -300,7 +300,7 @@ func TestListPodListSelection(t *testing.T) {
})},
{
Value
:
runtime
.
EncodeOrDie
(
latest
.
Codec
,
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"bar"
},
S
tatus
:
api
.
PodStatus
{
Host
:
"barhost"
},
S
pec
:
api
.
PodSpec
{
Host
:
"barhost"
},
})},
{
Value
:
runtime
.
EncodeOrDie
(
latest
.
Codec
,
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"baz"
},
...
...
@@ -341,13 +341,13 @@ func TestListPodListSelection(t *testing.T) {
field
:
"status.phase=Failed"
,
expectedIDs
:
util
.
NewStringSet
(
"baz"
),
},
{
field
:
"s
tatus
.host=barhost"
,
field
:
"s
pec
.host=barhost"
,
expectedIDs
:
util
.
NewStringSet
(
"bar"
),
},
{
field
:
"s
tatus
.host="
,
field
:
"s
pec
.host="
,
expectedIDs
:
util
.
NewStringSet
(
"foo"
,
"baz"
,
"qux"
,
"zot"
),
},
{
field
:
"s
tatus
.host!="
,
field
:
"s
pec
.host!="
,
expectedIDs
:
util
.
NewStringSet
(
"bar"
),
},
}
...
...
pkg/registry/pod/rest.go
View file @
19b6c85f
...
...
@@ -134,8 +134,8 @@ func MatchPod(label labels.Selector, field fields.Selector) generic.Matcher {
func
PodToSelectableFields
(
pod
*
api
.
Pod
)
labels
.
Set
{
return
labels
.
Set
{
"name"
:
pod
.
Name
,
"spec.host"
:
pod
.
Spec
.
Host
,
"status.phase"
:
string
(
pod
.
Status
.
Phase
),
"status.host"
:
pod
.
Status
.
Host
,
}
}
...
...
plugin/pkg/scheduler/factory/factory.go
View file @
19b6c85f
...
...
@@ -154,7 +154,7 @@ func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys util.StringSe
Binder
:
&
binder
{
f
.
Client
},
NextPod
:
func
()
*
api
.
Pod
{
pod
:=
f
.
PodQueue
.
Pop
()
.
(
*
api
.
Pod
)
glog
.
V
(
2
)
.
Infof
(
"
glog.v2 -->
About to try and schedule pod %v"
,
pod
.
Name
)
glog
.
V
(
2
)
.
Infof
(
"About to try and schedule pod %v"
,
pod
.
Name
)
return
pod
},
Error
:
f
.
makeDefaultErrorFunc
(
&
podBackoff
,
f
.
PodQueue
),
...
...
@@ -259,7 +259,7 @@ func getHostFieldLabel(apiVersion string) string {
case
"v1beta1"
,
"v1beta2"
:
return
"DesiredState.Host"
default
:
return
"s
tatus
.host"
return
"s
pec
.host"
}
}
...
...
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