DataDog / extendeddaemonset

Kubernetes Extended Daemonset controller
Apache License 2.0
98 stars 13 forks source link

Simplify replicaset selection #24

Closed celenechang closed 4 years ago

celenechang commented 4 years ago

This change is motivated by updates being made to allow canary failure (and reversion of the active RS).

In this PR, the activeRS is explicitly set and then passed to selectCurrentReplicaSet for comparison with upToDateRS.

While working on the other branch, this part of the code was leading to some issues with deleting the failed canary RS. I thought it may help to make a separate PR with a noop change first.

(I was also motivated by noticing lingering of old ERS, also observed on chinook. But for some reason I cannot replicate this behavior anymore.)

codecov-commenter commented 4 years ago

Codecov Report

Merging #24 into master will decrease coverage by 0.13%. The diff coverage is 86.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
- Coverage   33.26%   33.13%   -0.14%     
==========================================
  Files          23       23              
  Lines        1521     1518       -3     
==========================================
- Hits          506      503       -3     
  Misses        946      946              
  Partials       69       69              
Flag Coverage Δ
#unittests 33.13% <86.36%> (-0.14%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../extendeddaemonset/extendeddaemonset_controller.go 65.61% <86.36%> (-0.47%) :arrow_down:

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 7db1b06...f39b877. Read the comment docs.