keikoproj / upgrade-manager

Reliable, extensible rolling-upgrades of Autoscaling groups in Kubernetes
Apache License 2.0
141 stars 45 forks source link

Feature: Maintenance window #311

Closed Israphel closed 2 years ago

Israphel commented 2 years ago

It would be nice to be able to select a maintenance window. So, rather than triggering the whole upgrade process when the launch template bumps one version, it should be "launch template changed AND I'm on on the maintenance window".

eytan-avisror commented 2 years ago

@Israphel Thanks for filing this. Are you referring to use with instance-manager? since the upgrade is triggered by submitting a rolling upgrade object, this can be done at the time of your choosing

In the case of instance-manager it's triggered immediately with a change.

Israphel commented 2 years ago

We use EKS with self managed nodes (which are just autoscaling groups with launch templates). We want to submit a new version of the launch template (that will most likely be the same but with a newer AMI), but we want upgrade-manager to be triggered in a specific timeframe.

Is it possible? or we have to re-apply the manifest?

eytan-avisror commented 2 years ago

Every RollingUpgrade object is single-use (like a job), so after it performs the node rotation it can be deleted and can no longer trigger the upgrade - essentially, with the current code, you need to submit a new RollingUpgrade object every time you want to perform a node rotation

Israphel commented 2 years ago

okay, interesting. So if we create a wrapper on top that applies the object at the time we want (one per ASG), then that should be enough.

eytan-avisror commented 2 years ago

Yes, that should work. We are looking to add maintenance windows as a feature to instance-manager, but since you are using managed node groups it would be up to you to implement deployment of said RollingUpgrade objects at suitable time windows.