governor
governor copied to clipboard
Node Reaper: Refactor
We need to refactor node reaper, it started as a simple script, but as we add more and more logic, it seems the current structure is becoming a bit flakey.
We should have a make some structural improvements.
- K8s/AWS clients should be instantiated outside, this will allow to unit tests
Run()
- Better data structures for for
reapable
/drainable
- Remove duplicate code
- A lot of unnecessary if conditions
- Pass arguments to ReaperContext and validate them in a cleaner way
can i work on this? @eytan-avisror
@chan24 Sure, but can you please keep PRs small (vs. very large refactor PRs) so we can review/merge easily?