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
3caa7ada
Unverified
Commit
3caa7ada
authored
Jan 07, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #65469 from k82cn/k8s_64857
Set .spec.schedulerName to ds-controller.
parents
fdf38109
786d48d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
daemon_controller.go
pkg/controller/daemon/daemon_controller.go
+4
-3
No files found.
pkg/controller/daemon/daemon_controller.go
View file @
3caa7ada
...
@@ -1027,10 +1027,8 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod
...
@@ -1027,10 +1027,8 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod
defer
createWait
.
Done
()
defer
createWait
.
Done
()
var
err
error
var
err
error
podTemplate
:=
&
template
podTemplate
:=
template
.
DeepCopy
()
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ScheduleDaemonSetPods
)
{
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ScheduleDaemonSetPods
)
{
podTemplate
=
template
.
DeepCopy
()
// The pod's NodeAffinity will be updated to make sure the Pod is bound
// The pod's NodeAffinity will be updated to make sure the Pod is bound
// to the target node by default scheduler. It is safe to do so because there
// to the target node by default scheduler. It is safe to do so because there
// should be no conflicting node affinity with the target node.
// should be no conflicting node affinity with the target node.
...
@@ -1040,6 +1038,9 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod
...
@@ -1040,6 +1038,9 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod
err
=
dsc
.
podControl
.
CreatePodsWithControllerRef
(
ds
.
Namespace
,
podTemplate
,
err
=
dsc
.
podControl
.
CreatePodsWithControllerRef
(
ds
.
Namespace
,
podTemplate
,
ds
,
metav1
.
NewControllerRef
(
ds
,
controllerKind
))
ds
,
metav1
.
NewControllerRef
(
ds
,
controllerKind
))
}
else
{
}
else
{
// If pod is scheduled by DaemonSetController, set its '.spec.scheduleName'.
podTemplate
.
Spec
.
SchedulerName
=
"kubernetes.io/daemonset-controller"
err
=
dsc
.
podControl
.
CreatePodsOnNode
(
nodesNeedingDaemonPods
[
ix
],
ds
.
Namespace
,
podTemplate
,
err
=
dsc
.
podControl
.
CreatePodsOnNode
(
nodesNeedingDaemonPods
[
ix
],
ds
.
Namespace
,
podTemplate
,
ds
,
metav1
.
NewControllerRef
(
ds
,
controllerKind
))
ds
,
metav1
.
NewControllerRef
(
ds
,
controllerKind
))
}
}
...
...
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