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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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 78.66%. Comparing base (59e96a3) to head (6a0b489).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #32389      +/-   ##
==========================================
- Coverage   78.67%   78.66%   -0.02%     
==========================================
  Files         107      107              
  Lines        7237     7237              
  Branches     1329     1329              
==========================================
- Hits         5694     5693       -1     
- Misses       1357     1358       +1     
  Partials      186      186              
Flag Coverage Δ
suite.unit 78.66% <ø> (-0.02%) ⬇️

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

Components Coverage Δ
packages/aws-cdk 78.66% <ø> (-0.02%) ⬇️

@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.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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