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
d8958257
Commit
d8958257
authored
Jun 15, 2016
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DaemonController doesn't take any actions when being deleted.
parent
629f3c15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
daemoncontroller.go
pkg/controller/daemon/daemoncontroller.go
+1
-1
daemoncontroller_test.go
pkg/controller/daemon/daemoncontroller_test.go
+18
-0
No files found.
pkg/controller/daemon/controller.go
→
pkg/controller/daemon/
daemon
controller.go
View file @
d8958257
...
@@ -661,7 +661,7 @@ func (dsc *DaemonSetsController) syncDaemonSet(key string) error {
...
@@ -661,7 +661,7 @@ func (dsc *DaemonSetsController) syncDaemonSet(key string) error {
return
err
return
err
}
}
dsNeedsSync
:=
dsc
.
expectations
.
SatisfiedExpectations
(
dsKey
)
dsNeedsSync
:=
dsc
.
expectations
.
SatisfiedExpectations
(
dsKey
)
if
dsNeedsSync
{
if
dsNeedsSync
&&
ds
.
DeletionTimestamp
==
nil
{
dsc
.
manage
(
ds
)
dsc
.
manage
(
ds
)
}
}
...
...
pkg/controller/daemon/controller_test.go
→
pkg/controller/daemon/
daemon
controller_test.go
View file @
d8958257
...
@@ -289,6 +289,24 @@ func TestSufficentCapacityNodeDaemonLaunchesPod(t *testing.T) {
...
@@ -289,6 +289,24 @@ func TestSufficentCapacityNodeDaemonLaunchesPod(t *testing.T) {
syncAndValidateDaemonSets
(
t
,
manager
,
ds
,
podControl
,
1
,
0
)
syncAndValidateDaemonSets
(
t
,
manager
,
ds
,
podControl
,
1
,
0
)
}
}
// DaemonSets not take any actions when being deleted
func
TestDontDoAnythingIfBeingDeleted
(
t
*
testing
.
T
)
{
podSpec
:=
resourcePodSpec
(
"not-too-much-mem"
,
"75M"
,
"75m"
)
manager
,
podControl
:=
newTestController
()
node
:=
newNode
(
"not-too-much-mem"
,
nil
)
node
.
Status
.
Allocatable
=
allocatableResources
(
"200M"
,
"200m"
)
manager
.
nodeStore
.
Add
(
node
)
manager
.
podStore
.
Add
(
&
api
.
Pod
{
Spec
:
podSpec
,
})
ds
:=
newDaemonSet
(
"foo"
)
ds
.
Spec
.
Template
.
Spec
=
podSpec
now
:=
unversioned
.
Now
()
ds
.
DeletionTimestamp
=
&
now
manager
.
dsStore
.
Add
(
ds
)
syncAndValidateDaemonSets
(
t
,
manager
,
ds
,
podControl
,
0
,
0
)
}
// DaemonSets should not place onto nodes that would cause port conflicts
// DaemonSets should not place onto nodes that would cause port conflicts
func
TestPortConflictNodeDaemonDoesNotLaunchPod
(
t
*
testing
.
T
)
{
func
TestPortConflictNodeDaemonDoesNotLaunchPod
(
t
*
testing
.
T
)
{
podSpec
:=
api
.
PodSpec
{
podSpec
:=
api
.
PodSpec
{
...
...
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