Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale down older RS on non-happy path #76

Merged
merged 1 commit into from
May 17, 2019
Merged

Scale down older RS on non-happy path #76

merged 1 commit into from
May 17, 2019

Conversation

dthomson25
Copy link
Member

Solves the second half of #70 by scaling down and deleting old replicasets at any point of the rollout instead of just at the end.

@codecov-io
Copy link

codecov-io commented May 16, 2019

Codecov Report

Merging #76 into master will decrease coverage by 0.21%.
The diff coverage is 84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage    78.7%   78.48%   -0.22%     
==========================================
  Files          15       15              
  Lines        1700     1678      -22     
==========================================
- Hits         1338     1317      -21     
  Misses        269      269              
+ Partials       93       92       -1
Impacted Files Coverage Δ
controller/sync.go 74.77% <100%> (ø) ⬆️
controller/replicaset.go 69.69% <100%> (-1.74%) ⬇️
utils/replicaset/replicaset.go 94.26% <100%> (ø) ⬆️
utils/replicaset/bluegreen.go 100% <100%> (ø) ⬆️
controller/bluegreen.go 77.41% <75%> (-3.07%) ⬇️
controller/controller.go 50.81% <0%> (-0.23%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b122a64...07e9986. Read the comment docs.

recorder: &record.FakeRecorder{},
}
scaled, err := controller.reconcileOldReplicaSets(allRSs, oldRSs, newRS, rollout)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to changes, test was returning an empty replicaset instead of a modified rollout when the Update Rollout command was called. This caused a panic when the replicas pointer was dereferenced with the new changes. We needed to start the informers in order to have the reactor react on the update call and return the correct updated object.

readyPodsFromOldRS: 10,
readyPodsFromNewRS: 9,
scaleExpected: false,
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed since we should scale down regardless of the new rs state

@dthomson25 dthomson25 merged commit e45ac4c into master May 17, 2019
@dthomson25 dthomson25 deleted the cleanup branch May 17, 2019 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants