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
d0ce85a6
Commit
d0ce85a6
authored
Feb 23, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21687 from kargakis/generation-updates-for-label-annotation-changes
Auto commit by PR queue bot
parents
58783bc2
69cd75c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
6 deletions
+0
-6
strategy.go
pkg/registry/controller/strategy.go
+0
-3
strategy.go
pkg/registry/replicaset/strategy.go
+0
-3
No files found.
pkg/registry/controller/strategy.go
View file @
d0ce85a6
...
@@ -69,9 +69,6 @@ func (rcStrategy) PrepareForUpdate(obj, old runtime.Object) {
...
@@ -69,9 +69,6 @@ func (rcStrategy) PrepareForUpdate(obj, old runtime.Object) {
// status its own object, and even if we don't, writes may be the result of a
// status its own object, and even if we don't, writes may be the result of a
// read-update-write loop, so the contents of spec may not actually be the spec that
// read-update-write loop, so the contents of spec may not actually be the spec that
// the controller has *seen*.
// the controller has *seen*.
//
// TODO: Any changes to a part of the object that represents desired state (labels,
// annotations etc) should also increment the generation.
if
!
reflect
.
DeepEqual
(
oldController
.
Spec
,
newController
.
Spec
)
{
if
!
reflect
.
DeepEqual
(
oldController
.
Spec
,
newController
.
Spec
)
{
newController
.
Generation
=
oldController
.
Generation
+
1
newController
.
Generation
=
oldController
.
Generation
+
1
}
}
...
...
pkg/registry/replicaset/strategy.go
View file @
d0ce85a6
...
@@ -70,9 +70,6 @@ func (rsStrategy) PrepareForUpdate(obj, old runtime.Object) {
...
@@ -70,9 +70,6 @@ func (rsStrategy) PrepareForUpdate(obj, old runtime.Object) {
// status its own object, and even if we don't, writes may be the result of a
// status its own object, and even if we don't, writes may be the result of a
// read-update-write loop, so the contents of spec may not actually be the spec that
// read-update-write loop, so the contents of spec may not actually be the spec that
// the ReplicaSet has *seen*.
// the ReplicaSet has *seen*.
//
// TODO: Any changes to a part of the object that represents desired state (labels,
// annotations etc) should also increment the generation.
if
!
reflect
.
DeepEqual
(
oldRS
.
Spec
,
newRS
.
Spec
)
{
if
!
reflect
.
DeepEqual
(
oldRS
.
Spec
,
newRS
.
Spec
)
{
newRS
.
Generation
=
oldRS
.
Generation
+
1
newRS
.
Generation
=
oldRS
.
Generation
+
1
}
}
...
...
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