Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Bottlerocket node with explicit Version field #7666

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

yuxiang-zhang
Copy link
Member

@yuxiang-zhang yuxiang-zhang commented Mar 20, 2024

Description

Fixes #7627

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@yuxiang-zhang yuxiang-zhang force-pushed the fix-bottlerocket-upgrade branch 3 times, most recently from ff6f479 to 2395f48 Compare March 20, 2024 23:26
@yuxiang-zhang yuxiang-zhang marked this pull request as ready for review March 21, 2024 04:20
Copy link
Collaborator

@TiberiuGC TiberiuGC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

ngResource.Version = gfnt.NewString(kubernetesVersion)
} else {
logger.Info("will only upgrade release version")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I agree, any suggestions? how about something like will only use release version for upgrade

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@yuxiang-zhang yuxiang-zhang merged commit 00c736d into main Mar 21, 2024
9 checks passed
@yuxiang-zhang yuxiang-zhang deleted the fix-bottlerocket-upgrade branch March 21, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Update Bottlerocket nodes to latest AMI 1.29
2 participants