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
81c1e0c6
Commit
81c1e0c6
authored
Jan 25, 2017
by
Janet Kuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address comments
parent
634b6955
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
daemoncontroller.go
pkg/controller/daemon/daemoncontroller.go
+2
-2
daemoncontroller_test.go
pkg/controller/daemon/daemoncontroller_test.go
+1
-1
No files found.
pkg/controller/daemon/daemoncontroller.go
View file @
81c1e0c6
...
...
@@ -563,9 +563,9 @@ func (dsc *DaemonSetsController) manage(ds *extensions.DaemonSet) error {
for
err
:=
range
errCh
{
errors
=
append
(
errors
,
err
)
}
// Throw an error when the daemon pods fail, to use ratelimiter to prevent kill-recreate hot loop
if
failedPodsObserved
>
0
{
// Throw an error when the daemon pods fail to prevent kill-recreate hot loop
errors
=
append
(
errors
,
fmt
.
Errorf
(
"Deleted %d failed pods"
,
failedPodsObserved
))
errors
=
append
(
errors
,
fmt
.
Errorf
(
"deleted %d failed pods of DaemonSet %s/%s"
,
failedPodsObserved
,
ds
.
Namespace
,
ds
.
Name
))
}
return
utilerrors
.
NewAggregate
(
errors
)
}
...
...
pkg/controller/daemon/daemoncontroller_test.go
View file @
81c1e0c6
...
...
@@ -661,7 +661,7 @@ func TestObservedGeneration(t *testing.T) {
}
}
// DaemonSet controller should kill all failed pods and
recreate at most 1 failed pod
.
// DaemonSet controller should kill all failed pods and
create at most 1 pod on every node
.
func
TestDaemonKillFailedPods
(
t
*
testing
.
T
)
{
tests
:=
[]
struct
{
numFailedPods
,
numNormalPods
,
expectedCreates
,
expectedDeletes
int
...
...
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