Upgrade Bottlerocket node with explicit Version field#7666
Upgrade Bottlerocket node with explicit Version field#7666yuxiang-zhang merged 2 commits intomainfrom
Version field#7666Conversation
ff6f479 to
2395f48
Compare
There was a problem hiding this comment.
Great catch spotting that Bottlerocket release version doesn't necessarily change with K8s version!
This inconsistency makes reasoning about nodegroup upgrades annoyingly complicated. The fix seems to work, but the code section as a whole feels hacky. I take the blame for not properly re-factoring it myself when previously working on a related issue.
I don't have a problem approving it as is, so that we un-block eksctl users, but we may want to consider adding a new ticket for refactoring this area. In general, make it easier to understand whether release version, K8s version or both are being upgraded, and why that is.
pkg/actions/nodegroup/upgrade.go
Outdated
| if ngResource.ReleaseVersion == nil { | ||
| ngResource.Version = gfnt.NewString(kubernetesVersion) | ||
| } else { | ||
| logger.Info("will only upgrade release version") |
There was a problem hiding this comment.
I think this log doesn't always reflect the reality, as you might upgrade to a release version corresponding to next K8s version (e.g. for AL2 images).
There was a problem hiding this comment.
yeah I agree, any suggestions? how about something like will only use release version for upgrade
There was a problem hiding this comment.
Maybe we can have two separate logs depending on which ngResource field is set.
if ngResource.ReleaseVersion == nil {
logger.Info(fmt.Sprintf("will upgrade nodes to Kubernetes version: %s", ngResource.KubernetesVersion))
} else {
logger.Info(fmt.Sprintf("will upgrade nodes to release version: %s", ngResource.ReleaseVersion))
}
Something along these lines, wdyt?
2395f48 to
febff8e
Compare
Description
Fixes #7627
Checklist
README.md, or theuserdocsdirectory)area/nodegroup) and kind (e.g.kind/improvement)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯