Add cluster version rollback support with rollbackConfig#8780
Conversation
|
Hello michaelhtm 👋 Thank you for opening a Pull Request in |
Allow rolling back (downgrading) an EKS cluster's Kubernetes version by one minor version via `eksctl upgrade cluster --version <lower>`. - ResolveUpgradeVersion now resolves both the next and previous supported versions, permits a single-version downgrade (N->N-1), and rejects multi-version downgrades and downgrading the oldest supported version, replacing the old "cannot upgrade to a lower version" error. - Add metadata.rollbackConfig.timeoutMinutes (api.RollbackConfig) to configure how long EKS waits before automatically cancelling an in-progress version update. Validated to the API's 120-10080 range and plumbed into UpdateClusterVersion. - Bump aws-sdk-go-v2/service/eks to v1.88.0, which ships RollbackConfig on UpdateClusterVersion (and the CancelUpdate operation); regenerate the awsapi EKS interface, EKS mock, deepcopy helpers, and schema.
9d95743 to
4418bd1
Compare
| } | ||
|
|
||
| // Handle upgrade | ||
| if c > 0 { |
There was a problem hiding this comment.
what about c==0 case? If the current and desired version are same I believe this is going to downgrade path, which may be incorrect
There was a problem hiding this comment.
line 177 handles the early return case for desired == currentVersion
Address review feedback: when metadata.rollbackConfig omits timeoutMinutes
we were sending an empty "rollbackConfig": {} to UpdateClusterVersion. The
API tolerates it (it applies its default timeout either way), but it is
redundant, so only set input.RollbackConfig when there is a value to send.
1c668a2 to
c4d88bc
Compare
sapphirew
left a comment
There was a problem hiding this comment.
Thanks @michaelhtm! lgtm, despite a non-blocking comment.
There was a problem hiding this comment.
nit: could consider adding validations around the rest of pre-requisites for version rollback https://docs.aws.amazon.com/eks/latest/userguide/rollback-cluster.html
Description
Allow rolling back (downgrading) an EKS cluster's Kubernetes version by
one minor version via
eksctl upgrade cluster --version <lower>.versions, permits a single-version downgrade (N->N-1), and rejects
multi-version downgrades and downgrading the oldest supported version,
replacing the old "cannot upgrade to a lower version" error.
configure how long EKS waits before automatically cancelling an
in-progress version update. Validated to the API's 120-10080 range
and plumbed into UpdateClusterVersion.
on UpdateClusterVersion (and the CancelUpdate operation); regenerate
the awsapi EKS interface, EKS mock, deepcopy helpers, and schema.
Checklist
README.md, or theuserdocsdirectory)area/nodegroup) and kind (e.g.kind/improvement)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯