yonahd / kor

A Golang Tool to discover unused Kubernetes Resources
MIT License
1.04k stars 96 forks source link

feat: add jobs cleaner #168

Closed cindyliu-tec closed 11 months ago

cindyliu-tec commented 11 months ago

add a job resource cleaner, when a job's status.completedTime field has value, consider the job is completed, is safe to delete

yonahd commented 11 months ago

Amazing contribution! Overall looks great. I'll do a final review after you make the small adjustments to pass gating

codecov-commenter commented 11 months ago

Codecov Report

Attention: 40 lines in your changes are missing coverage. Please review.

Comparison is base (7f0367f) 45.52% compared to head (d617d57) 45.96%. Report is 2 commits behind head on main.

Files Patch % Lines
pkg/kor/jobs.go 56.00% 14 Missing and 8 partials :warning:
pkg/kor/all.go 0.00% 9 Missing :warning:
pkg/kor/delete.go 0.00% 7 Missing :warning:
pkg/kor/multi.go 0.00% 2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #168 +/- ## ========================================== + Coverage 45.52% 45.96% +0.43% ========================================== Files 21 22 +1 Lines 1990 2080 +90 ========================================== + Hits 906 956 +50 - Misses 930 962 +32 - Partials 154 162 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.