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
6c13a020
Commit
6c13a020
authored
Mar 17, 2017
by
better88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix revision when SetDeploymentRevision
parent
b617cabf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
deployment_controller_test.go
pkg/controller/deployment/deployment_controller_test.go
+1
-3
sync.go
pkg/controller/deployment/sync.go
+2
-1
No files found.
pkg/controller/deployment/deployment_controller_test.go
View file @
6c13a020
...
...
@@ -287,9 +287,7 @@ func TestReentrantRollback(t *testing.T) {
d
:=
newDeployment
(
"foo"
,
1
,
nil
,
nil
,
nil
,
map
[
string
]
string
{
"foo"
:
"bar"
})
d
.
Spec
.
RollbackTo
=
&
extensions
.
RollbackConfig
{
Revision
:
0
}
// TODO: This is 1 for now until FindOldReplicaSets gets fixed.
// See https://github.com/kubernetes/kubernetes/issues/42570.
d
.
Annotations
=
map
[
string
]
string
{
util
.
RevisionAnnotation
:
"1"
}
d
.
Annotations
=
map
[
string
]
string
{
util
.
RevisionAnnotation
:
"2"
}
f
.
dLister
=
append
(
f
.
dLister
,
d
)
rs1
:=
newReplicaSet
(
d
,
"deploymentrs-old"
,
0
)
...
...
pkg/controller/deployment/sync.go
View file @
6c13a020
...
...
@@ -259,7 +259,8 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme
return
dc
.
client
.
Extensions
()
.
ReplicaSets
(
rsCopy
.
ObjectMeta
.
Namespace
)
.
Update
(
rsCopy
)
}
updateConditions
:=
deploymentutil
.
SetDeploymentRevision
(
deployment
,
newRevision
)
// Should use the revision in existingNewRS's annotation, since it set by before
updateConditions
:=
deploymentutil
.
SetDeploymentRevision
(
deployment
,
rsCopy
.
Annotations
[
deploymentutil
.
RevisionAnnotation
])
// If no other Progressing condition has been recorded and we need to estimate the progress
// of this deployment then it is likely that old users started caring about progress. In that
// case we need to take into account the first time we noticed their new replica set.
...
...
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