redhat-cop / openshift-toolkit

A collection of code samples to help you get started with OpenShift
Apache License 2.0
234 stars 150 forks source link

Possible redundancies between cluster-management/ and maintenance_cleanup/ #26

Open etsauer opened 7 years ago

etsauer commented 7 years ago

It looks like we have an opportunity to do some refactoring and consolidation of a couple of our solutions. The cluster-management folder contains instructions and playbooks to deploy docker-gc, which I believe does some similar things to some of the cleanup scripts in the maintenance_cleanup/ folder. Additionally, I think maybe there is some opportunity to make these solutions more "OpenShift-y" by combining the capabilities of those two solutions and deploying them as ScheduledJobs rather than linux cron jobs.

@sal2fcVir @themoosman what do you think?

SamLeonard93 commented 7 years ago

Agree on making them a ScheduledJob rather than a cron job at this point.

etsauer commented 7 years ago

i think we could do most of this with a combination of a Scheduled job for docker-gc, and a set of scheduled jobs to run oc adm prune like: https://github.com/redhat-cop/openshift-management/tree/master/jobs#pruning-resources

etsauer commented 7 years ago

Actually, that whole repo could probably get migrated into this one in some form. @sabre1041 what do you think?

themoosman commented 7 years ago

I see no reason those shouldn't be converted to Jobs.