Skip to content

Conversation

@pahud
Copy link
Contributor

@pahud pahud commented Jun 20, 2025

Issue # (if applicable)

Related to #34780

Reason for this change

After thorough investigation, the original issue was caused by a misunderstanding of taint effect format differences between AWS EKS API and Kubernetes manifests. The TaintEffect enum is working correctly as designed for its intended purpose (EKS NodeGroups).

Description of changes

Documentation Changes:

  • Added comprehensive documentation to the TaintEffect enum explaining the format differences between AWS EKS API and Kubernetes manifests
  • Clarified that the enum is specifically designed for EKS NodeGroups (AWS API format)
  • Provided guidance on when to use the enum vs string literals

Key findings from investigation:

  • AWS EKS API expects: NO_SCHEDULE, PREFER_NO_SCHEDULE, NO_EXECUTE
  • Kubernetes manifests expect: NoSchedule, PreferNoSchedule, NoExecute
  • This difference is documented in the AWS EKS User Guide
  • Integration tests confirmed that changing enum values breaks EKS NodeGroup deployments

Why the original approach was incorrect:
The TaintEffect enum cannot be changed because it would break all existing EKS NodeGroup deployments. The enum is correctly designed for AWS EKS API, not for direct Kubernetes manifests.

Correct solution for users:

  • Use TaintEffect enum for EKS NodeGroups (AWS API format)
  • Use string literals with PascalCase for Kubernetes manifests (Kubernetes format)

Describe any new or updated permissions being added

No new or updated IAM permissions are needed for this change.

Description of how you validated changes

  • Integration Testing: Confirmed that attempting to change enum values causes EKS API validation failures
  • AWS Documentation Review: Verified the format differences in official AWS documentation
  • Code Analysis: Confirmed that the enum is used correctly throughout the codebase for EKS NodeGroups

Checklist


--
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team June 20, 2025 23:36
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 labels Jun 20, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 20, 2025
@pahud pahud changed the title fix(nodegroup): update taint effect values to match expected casing fix(nodegroup): incorrect casting of the taint effect values Jun 20, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

@pahud pahud changed the title fix(nodegroup): incorrect casting of the taint effect values docs(eks): clarify TaintEffect enum usage for AWS vs Kubernetes contexts Jun 21, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review June 21, 2025 00:31

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@pahud pahud marked this pull request as ready for review June 21, 2025 00:32
@aemada-aws aemada-aws self-assigned this Jun 25, 2025
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: c17396c
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Member

@Abogical Abogical left a comment

Choose a reason for hiding this comment

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

There is a lint failure. See logs [here](Build Logs).

@aws-cdk/aws-eks-v2-alpha: /codebuild/output/src1131233384/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-eks-v2-alpha/lib/managed-nodegroup.ts
@aws-cdk/aws-eks-v2-alpha:   159:3   error  Trailing spaces not allowed  no-trailing-spaces
@aws-cdk/aws-eks-v2-alpha:   163:3   error  Trailing spaces not allowed  no-trailing-spaces
@aws-cdk/aws-eks-v2-alpha:   166:66  error  Trailing spaces not allowed  no-trailing-spaces
@aws-cdk/aws-eks-v2-alpha:   168:3   error  Trailing spaces not allowed  no-trailing-spaces

@mergify
Copy link
Contributor

mergify bot commented Aug 27, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Aug 27, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 460a9d8 into aws:main Aug 27, 2025
18 checks passed
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants