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

feat(eks): add L2 constructs to support EKS Hybrid Nodes #32389

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

abhay-krishna
Copy link
Member

@abhay-krishna abhay-krishna commented Dec 5, 2024

Issue # (if applicable)

Closes #32362.

Reason for this change

This change allows users to specify the networking primitives for an EKS Hybrid nodes cluster through L2 constructs.

Description of changes

This PR introduces two new top-level fields called remoteNodeNetworks and remotePodNetworks in the Cluster construct. Together, these allow users to specify the exact CIDRs ranges they want to use for their on-premises nodes and (optionally) pods. The Hybrid nodes feature requires that none of the node and pod CIDRs overlap with each other so I have also added validations for that.

Description of how you validated changes

Added unit tests with different testcases involving different remote network configurations.

Checklist


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

@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 labels Dec 5, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team December 5, 2024 07:43
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Dec 5, 2024
@abhay-krishna abhay-krishna changed the title Add L2 constructs to support EKS Hybrid Nodes feat(eks): add L2 constructs to support EKS Hybrid Nodes Dec 5, 2024
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.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.92%. Comparing base (1d15d49) to head (3127242).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32389   +/-   ##
=======================================
  Coverage   80.92%   80.92%           
=======================================
  Files         236      236           
  Lines       14255    14255           
  Branches     2491     2491           
=======================================
  Hits        11536    11536           
  Misses       2434     2434           
  Partials      285      285           
Flag Coverage Δ
suite.unit 80.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 79.74% <ø> (ø)
packages/aws-cdk-lib/core 82.20% <ø> (ø)

@abhay-krishna abhay-krishna force-pushed the hybrid-nodes-support branch 2 times, most recently from 57f536c to b24b684 Compare December 6, 2024 09:34
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 6, 2024 09:36

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

@abhay-krishna abhay-krishna force-pushed the hybrid-nodes-support branch 3 times, most recently from 9925674 to 1a96b54 Compare December 7, 2024 00:15
@abhay-krishna
Copy link
Member Author

@khushail Can you review this PR? The large diff is due to the several integration test snapshots being updated, I would suggest filtering *.ts files to see the actual changes I made for the Hybrid nodes feature. Thank you!

@abhay-krishna abhay-krishna force-pushed the hybrid-nodes-support branch 2 times, most recently from 99aac37 to 79b1d7e Compare December 8, 2024 00:01
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Dec 8, 2024
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.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation dismissed their stale review December 9, 2024 20:13

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

@abhay-krishna
Copy link
Member Author

@khushail all the GitHub actions passed except the CodeQL scanning results. It's complaining on integration test snapshot code that's autogenerated. Do you have any pointers on how to resolve this?

@khushail
Copy link
Contributor

@abhay-krishna , integration test snapshots need to be generated and submitted by you. Here is a guide on how to do that -https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md#running-integration-tests.

You might want to look for existing closed PRs for additional help on generating these snapshot tests. Hope that would be helpful.

@abhay-krishna
Copy link
Member Author

abhay-krishna commented Dec 10, 2024

@abhay-krishna , integration test snapshots need to be generated and submitted by you. Here is a guide on how to do that -https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md#running-integration-tests.

You might want to look for existing closed PRs for additional help on generating these snapshot tests. Hope that would be helpful.

@khushail Yes I understood that part, and I have submitted those integration test changes and snapshots too. However the CodeQL scanner is failing a check on one of those snapshots. Since these snapshots are generated code and I'm not handwriting them, I am not sure how to go about fixing them.

@abhay-krishna abhay-krishna force-pushed the hybrid-nodes-support branch 4 times, most recently from c25a6ea to 04f834f Compare December 16, 2024 21:17
@GavinZZ GavinZZ added the pr-linter/do-not-close The PR linter will not close this PR while this label is present label Feb 6, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 6, 2025
@mergify mergify bot dismissed GavinZZ’s stale review February 10, 2025 08:48

Pull request has been modified.

@abhay-krishna abhay-krishna force-pushed the hybrid-nodes-support branch 3 times, most recently from 61ead02 to 3491be8 Compare February 10, 2025 22:38
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 10, 2025
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

One minor comment and I'm happy to approve. Thank you!

packages/aws-cdk-lib/aws-eks/lib/cluster.ts Outdated Show resolved Hide resolved
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 11, 2025
@mergify mergify bot dismissed GavinZZ’s stale review February 11, 2025 06:33

Pull request has been modified.

GavinZZ
GavinZZ previously approved these changes Feb 11, 2025
@mergify mergify bot dismissed GavinZZ’s stale review February 11, 2025 18:42

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 11, 2025
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for addressing all the comments!

Copy link
Contributor

mergify bot commented Feb 12, 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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

mergify bot commented Feb 12, 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 b91965c into aws:main Feb 12, 2025
20 checks passed
Copy link

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 Feb 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. pr-linter/do-not-close The PR linter will not close this PR while this label is present
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eks: Add L2 constructs for EKS Hybrid Nodes support
5 participants