keikoproj / lifecycle-manager

Graceful AWS scaling event on Kubernetes using lifecycle hooks
Apache License 2.0
93 stars 28 forks source link

refactor & improvements #42

Closed eytan-avisror closed 4 years ago

eytan-avisror commented 4 years ago

Contributes to #35

This PR refactors a lot of the code for better structure and better performance of API Calls to AWS.

Testing Done:

codecov[bot] commented 4 years ago

Codecov Report

Merging #42 into master will increase coverage by 0.24%. The diff coverage is 69.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   72.82%   73.06%   +0.24%     
==========================================
  Files           9       12       +3     
  Lines         861      995     +134     
==========================================
+ Hits          627      727     +100     
- Misses        176      206      +30     
- Partials       58       62       +4
Impacted Files Coverage Δ
pkg/service/lifecycle.go 61.53% <ø> (ø)
pkg/service/nodes.go 86.58% <ø> (-0.17%) :arrow_down:
pkg/service/elbv2.go 100% <100%> (ø) :arrow_up:
pkg/service/events.go 78.57% <100%> (-2.68%) :arrow_down:
pkg/service/elb.go 100% <100%> (ø) :arrow_up:
pkg/service/metrics.go 84.61% <33.33%> (-15.39%) :arrow_down:
pkg/service/deregistrator.go 47.88% <47.88%> (ø)
pkg/service/autoscaling.go 78.57% <60%> (ø) :arrow_up:
pkg/service/server.go 62.82% <66.44%> (+0.46%) :arrow_up:
pkg/service/target.go 78.26% <78.26%> (ø)
... and 4 more

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 44e79ed...bf6f9a2. Read the comment docs.

eytan-avisror commented 4 years ago

Load tests: Screen Shot 2020-01-27 at 11 04 07 AM Screen Shot 2020-01-27 at 11 10 37 AM

eytan-avisror commented 4 years ago

Can you add a "Testing Done" section to the commit? For large PRs, that's the easiest way to check if all corner cases have been covered.

There are test results one comment above, I've added a summary in the PR