DataDog / extendeddaemonset

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

Add ERS canary NoRestartDuration and AutoFail configuration options to complement AutoPause behavior #66

Closed xornivore closed 3 years ago

xornivore commented 3 years ago

What does this PR do?

Adds new features to handle restarts in the canary phase:

Additional Notes

Describe your test plan

For NoRestartsDuration - configure a canary with a pod that is causing restarts within no restart duration, make sure that canary phase is not ended until this duration elapses.

For AutoFail - configure it with either MaxRestarts or MaxRestartsDuration and make sure the transition to canary-failed state takes place.

codecov-io commented 3 years ago

Codecov Report

Merging #66 (a84ce22) into master (4755dcd) will decrease coverage by 2.03%. The diff coverage is 11.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
- Coverage   36.75%   34.71%   -2.04%     
==========================================
  Files          29       29              
  Lines        1570     1688     +118     
==========================================
+ Hits          577      586       +9     
- Misses        919     1028     +109     
  Partials       74       74              
Flag Coverage Δ
unittests 34.71% <11.93%> (-2.04%) :arrow_down:

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

Impacted Files Coverage Δ
...trollers/extendeddaemonsetreplicaset/controller.go 53.81% <0.00%> (-0.99%) :arrow_down:
...ers/extendeddaemonsetreplicaset/strategy/canary.go 0.00% <0.00%> (ø)
...endeddaemonsetreplicaset/strategy/rollingupdate.go 9.00% <0.00%> (ø)
...llers/extendeddaemonsetreplicaset/strategy/type.go 0.00% <ø> (ø)
...lers/extendeddaemonsetreplicaset/strategy/utils.go 16.85% <20.00%> (-2.38%) :arrow_down:
pkg/controller/utils/pod/pod.go 15.78% <61.53%> (-0.65%) :arrow_down:
controllers/extendeddaemonset/utils.go 94.87% <100.00%> (+1.53%) :arrow_up:

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 4755dcd...a84ce22. Read the comment docs.