Skip to content

🐛 Fix missing CRD validation for Amazon Linux 2023 eksLookupType #5558

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

Merged
merged 3 commits into from
Jun 26, 2025

Conversation

AmitSahastra
Copy link
Contributor

What type of PR is this?
/kind bug

With recent changes introduced to support AL2023 EKS lookup #5517.

This PR fixes the missing CRD changes that prevent users from using the AL2023 feature. While PR #5517 added the AMI lookup logic for Amazon Linux 2023, it missed updating the CRD validation enums, causing validation errors when users try to specify eksLookupType: "AmazonLinux2023".

What this PR does / why we need it:

This PR completes the AL2023 support by adding the missing CRD enum values. The original PR #5517 added the backend logic for AL2023 AMI lookup but forgot to update the CRD validation, making the feature unusable. This fix enables users to actually use the AL2023 feature that was intended to be supported.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Fixes the validation error when users try to use eksLookupType: "AmazonLinux2023" in their AWSManagedMachinePool specifications.

Special notes for your reviewer:

  • This change is backward compatible - existing configurations using AmazonLinux and AmazonLinuxGPU will continue to work
  • The CRDs have been regenerated to include the new enum values
  • Both v1beta1 and v1beta2 API versions are updated
  • This completes the AL2023 support that was partially implemented in PR ✨ feat: add amazon-linux-2023 ami lookup parameters for ssm #5517

Changes made:

  • API Types: Updated the EKSOptimizedLookupType enum in both api/v1beta1/types.go and api/v1beta2/types.go to include:
    • AmazonLinux2023
    • AmazonLinux2023GPU
  • CRD Generation: Regenerated all relevant CRDs to include the new enum values:
    • infrastructure.cluster.x-k8s.io_awsmachinepools.yaml
    • infrastructure.cluster.x-k8s.io_awsmachines.yaml
    • infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml
    • infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

🐛 Fix missing CRD validation for Amazon Linux 2023 eksLookupType enum values, completing the AL2023 support introduced in v2.8.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 19, 2025
@k8s-ci-robot k8s-ci-robot added needs-priority size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 19, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @AmitSahastra. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@nrb
Copy link
Contributor

nrb commented Jun 20, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 20, 2025
Copy link
Contributor

@fiunchinho fiunchinho left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 24, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 58eeb4bcc46b3fd42f98211e486d9085daedd454

@richardcase
Copy link
Member

/cherrypick release-2.8

@k8s-infra-cherrypick-robot

@richardcase: once the present PR merges, I will cherry-pick it on top of release-2.8 in a new PR and assign it to you.

In response to this:

/cherrypick release-2.8

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@damdo
Copy link
Member

damdo commented Jun 26, 2025

/hold

until v1beta1 changes are removed

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2025
Copy link
Contributor

@AndiDog AndiDog left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2025
@AmitSahastra AmitSahastra requested a review from richardcase June 26, 2025 08:22
@richardcase
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2025
Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e734d224f7ee048026406b7cf72f38d8180ba6dd

@damdo
Copy link
Member

damdo commented Jun 26, 2025

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2025
@k8s-ci-robot k8s-ci-robot merged commit 07599e6 into kubernetes-sigs:main Jun 26, 2025
18 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v2.8 milestone Jun 26, 2025
@k8s-infra-cherrypick-robot

@richardcase: new pull request created: #5566

In response to this:

/cherrypick release-2.8

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants