rancher / system-upgrade-controller

In your Kubernetes, upgrading your nodes
Apache License 2.0
723 stars 86 forks source link

Add cron schedule to plans #284

Closed brainkiller closed 8 months ago

brainkiller commented 8 months ago

Is your feature request related to a problem? Please describe. For OS upgrades (debian) I wanted to run apt-get upgrade through the system-upgrade-controller on a regular interval (monthly for example) to ensure the security updates are installed regularly. But I cannot find a way to either trigger a plan manually (cron external) or to add a cron schedule directly in the plan spec.

Describe the solution you'd like Ideally the cron schedule could be added in the plan spec so all information is in the same plan.

Describe alternatives you've considered Alternatively I thought of triggering the plan deployment from a kubernetes cronjob by leveraging the service accounts but this seems cumbersome.

brandond commented 8 months ago

I believe this is a duplicate of

brandond commented 8 months ago

Note that just having an idempotent script that runs on a recurring basis is NOT what the SUC is for; there must be a version that changes in some way in order for the controller to kick off a job. If you are looking at just running pods on a recurring basis, you might look at using https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/