eraser icon indicating copy to clipboard operation
eraser copied to clipboard

[REQ] CronJob/Crontab based image cleanup

Open justusbunsi opened this issue 7 months ago • 5 comments

What kind of request is this?

New feature

What is your request or suggestion?

Hi. First things first: This project saves me a ton of time and headache. Thank you for maintaining it. 👍

Would you be open to supporting cronjob/crontab based image cleanup? This would decouple the controller behavior from its maintenance.

To give some context to my request:

Right now, the image cleanup execution relies on two things:

  • when the controller-manager starts
  • when the configured scheduling interval and delay matches

Configured correctly and started outside of main working hours, this concept works quite well to remove unused/outdated CI images from worker nodes. When updating or restarting the controller-manager (preferably during work hours), the interval and delay gets out of sync with desired cleanup time. Based on the defined interval, this can lead to unnecessary additional image pulls during working hours and increases build times.

Are you willing to submit PRs to contribute to this feature request?

  • [X] Yes, I am willing to implement it.

justusbunsi avatar Jul 19 '24 13:07 justusbunsi