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

aws-eks: Support CUSTOM AMI type on Nodegroups #30641

Open
1 of 2 tasks
Artemigos opened this issue Jun 24, 2024 · 1 comment · May be fixed by #30660
Open
1 of 2 tasks

aws-eks: Support CUSTOM AMI type on Nodegroups #30641

Artemigos opened this issue Jun 24, 2024 · 1 comment · May be fixed by #30660
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@Artemigos
Copy link

Describe the feature

CloudFormation supports passing CUSTOM as value for AmiType: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-amitype

This is not available in CDK, making the use of custom AMIs impossible.

Use Case

When building custom AMIs for a cluster (e.g. based on the EKS optimized images) you should be able to use them.

Proposed Solution

Rough idea:

It looks like this should already be enough, but I didn't actually attempt doing this.

Other Information

I tried forcing the issue by bypassing TypeScript checks: amiType: ('CUSTOM' as any) - internal check rejected it. After investigating a little - the Nodegroup constructor tries to do the right thing and validates the value, but completely ignores the existence of CUSTOM in CloudFormation.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.133.0

Environment details (OS name and version, etc.)

Ubuntu 22.04.4 LTS

@Artemigos Artemigos added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 24, 2024
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Jun 24, 2024
@ashishdhingra ashishdhingra self-assigned this Jun 24, 2024
@ashishdhingra ashishdhingra added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 24, 2024
@pahud
Copy link
Contributor

pahud commented Jun 24, 2024

@Artemigos Yes we should support that.

  1. when CUSTOM is provided, a launch template has to be provided as well.
  2. we probably should add CUSTOM to possibleAmiTypes here:

possibleAmiTypes = getPossibleAmiTypes(instanceTypes);

Feel free to submit a PR for it. Thank you.

@pahud pahud added p2 effort/small Small work item – less than a day of effort labels Jun 24, 2024
@ashishdhingra ashishdhingra removed their assignment Jun 24, 2024
@ashishdhingra ashishdhingra removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Jun 24, 2024
@Artemigos Artemigos linked a pull request Jun 25, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants