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
952e6c64
Commit
952e6c64
authored
Feb 24, 2018
by
Tomas Nozicka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Deployment with Recreate strategy not to wait on Pods in terminal phase
parent
82eeda08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
recreate.go
pkg/controller/deployment/recreate.go
+13
-2
No files found.
pkg/controller/deployment/recreate.go
View file @
952e6c64
...
@@ -104,8 +104,19 @@ func oldPodsRunning(newRS *extensions.ReplicaSet, oldRSs []*extensions.ReplicaSe
...
@@ -104,8 +104,19 @@ func oldPodsRunning(newRS *extensions.ReplicaSet, oldRSs []*extensions.ReplicaSe
if
newRS
!=
nil
&&
newRS
.
UID
==
rsUID
{
if
newRS
!=
nil
&&
newRS
.
UID
==
rsUID
{
continue
continue
}
}
if
len
(
podList
.
Items
)
>
0
{
for
_
,
pod
:=
range
podList
.
Items
{
return
true
switch
pod
.
Status
.
Phase
{
case
v1
.
PodFailed
,
v1
.
PodSucceeded
:
// Don't count pods in terminal state.
continue
case
v1
.
PodUnknown
:
// This happens in situation like when the node is temporarily disconnected from the cluster.
// If we can't be sure that the pod is not running, we have to count it.
return
true
default
:
// Pod is not in terminal phase.
return
true
}
}
}
}
}
return
false
return
false
...
...
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