Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Feature request: Infer AMI from current configuration or allow user to pass custom AMI #34

Description

@bryantbiggs

Use case

(Instead of trying to re-interpret the current logic, I'll defer to describing the intended logic)

--custom-ami-id argument should be added for users to pass a custom AMI ID.

When performing an upgrade of EKS and/or self-managed nodegroups, the process for determining the appropriate AMI should follow:

Self-managed nodegroup

If --custom-ami-id has been supplied with a value, simply proceed to grab each ASG and its LT and create a new LT version with the AMI ID provided. If --custom-ami-id has NOT been supplied:

  1. Get the launch template of each self-managed autoscaling group (we are ignoring support for launch configuration since its EOL)
  2. From the LTs, extract the AMI ID
  3. Perform a describe call on the AMI to determine if this is an Amazon EKS optimized AMI, and of which variant (AL2, Bottlerocket, Windows variants) and arch (x86/arm64)
  4. If this is NOT an Amazon EKS optimized AMI, and --custom-ami-id has not been supplied, halt progress and return details to user that a custom AMI ID is required when an Amazon EKS optimized AMI is not currently in use
  5. If this is an Amazon EKS optimized AMI, retrieve the AMI ID of the next incremental Kubernetes version from the associated SSM parameter (get the AMI ID for the next version of K8s for the given AMI variant and arch)
  6. Create a new LT version with the new AMI ID, update the ASG, etc. (roll out changes)

EKS managed nodegroup

Default launch template

  1. No-op from an AMI perspective; once the nodegroup Kubneretes version has been updated, the managed nodegroup will pull the appropriate AMI and deploy

Custom launch template

  1. Get the ASGs from each of the EKS managed nodegroups
  2. If there is NOT an AMI ID specified on the nodegroup, then the AMIs used are the EKS optimized AMIs - update the nodegroup version to the next incremental Kubernetes version and roll out changes
  3. If there is an AMI ID specified on the nodegroup, this is a custom AMI and the user should have provided a --custom-ami-id, otherwise abort and report (nice rhyme!)

Solution/User Experience

The logic used for determining an AMI ID should be consistent and reliable without assumptions

Alternative solutions

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions