Graceful shutdown, concurrent checks and more!
Before this MR the checker wasn't able to cleanup properly in most cases (when an error occurs, compliancy check failed or on pressing: "CTRL+C" for example). With the new Kubernetes client we can pass the context properly and implement timeouts, cancellations and graceful shutdown properly. Reviewing is easier by checking the MR commit-by-commit as each commit refactors only one thing.
Features:
- Graceful shutdown (and proper cleanup)
- Run checks concurrently
- Always get an overview of the result (even if something fails)
- Should be faster compared to previous versions
- Fixed race condition in progress bar
Todo:
-
Fix atomic copy issue in progressbar -
Only show "received shutdown signal" message on an actual signal -
Refactor cleanup on exit
Testing:
-
AKS -
OpenShift (via CRC) -
K3s
Edited by Dillen Meijboom