docker-archive / deploykit

A toolkit for creating and managing declarative, self-healing infrastructure.
Apache License 2.0
2.25k stars 262 forks source link

Conditionally disable Drain during rolling update Destroy #870

Closed kaufers closed 6 years ago

kaufers commented 6 years ago

Adds support for another value in the group Spec.Updating struct:

"Updating": {
  "SkipBeforeInstanceDestroy" : "drain"
},

The SkipBeforeInstanceDestroy defines actions that should be skipped prior to invoking instance.Destroy during a rolling update.

Only valid value is drain.

codecov[bot] commented 6 years ago

Codecov Report

Merging #870 into master will increase coverage by 0.22%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #870      +/-   ##
==========================================
+ Coverage   48.76%   48.98%   +0.22%     
==========================================
  Files          91       91              
  Lines        8213     8221       +8     
==========================================
+ Hits         4005     4027      +22     
+ Misses       3837     3827      -10     
+ Partials      371      367       -4
Impacted Files Coverage Δ
pkg/controller/group/scaled.go 87.5% <100%> (+8.65%) :arrow_up:
pkg/spi/instance/description.go 80.48% <0%> (-2.44%) :arrow_down:
pkg/types/spec.go 60.17% <0%> (+1.76%) :arrow_up:
pkg/rpc/mux/server.go 47.91% <0%> (+5.2%) :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 7c4e08e...223c937. Read the comment docs.

GordonTheTurtle commented 6 years ago

Please sign your commits following these rules: https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:

$ git clone -b "flavor-wrk-no-remove" git@github.com:kaufers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353905632
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.