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

(eks): clarify that vpc prop is necessary for subnetSelection prop to work in FargateProfile construct #16349

Closed
peterwoodworth opened this issue Sep 2, 2021 · 3 comments · Fixed by #16631 or #16632
Assignees
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service documentation This is a problem with documentation. feature-request A feature should be added or improved. p1

Comments

@peterwoodworth
Copy link
Contributor

There's a check in the FargateProfile constructor which only uses the subnetSelection prop if the vpc prop is defined:

let subnets: string[] | undefined;
if (props.vpc) {
const selection: ec2.SubnetSelection = props.subnetSelection ?? { subnetType: ec2.SubnetType.PRIVATE };
subnets = props.vpc.selectSubnets(selection).subnetIds;
}

However our docs don't make this clear, which lead to customer confusion from having all of their private subnets be selected. We should clarify that the vpc prop also needs to be defined for the subnetSelection prop to work.

Additionally, we could throw an error if the subnetSelection prop is defined and the vpc isn't, but I'm not sure if that would be a breaking change.


This is a 📕 documentation issue

@peterwoodworth peterwoodworth added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. documentation This is a problem with documentation. p1 and removed needs-triage This issue or PR still needs to be triaged. labels Sep 2, 2021
@github-actions github-actions bot added @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service labels Sep 2, 2021
@peterwoodworth peterwoodworth removed the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Sep 2, 2021
@peterwoodworth
Copy link
Contributor Author

@otaviomacedo let me know if we should do anything in addition to updating the docs here. I can handle the PR

@peterwoodworth peterwoodworth self-assigned this Sep 2, 2021
@otaviomacedo
Copy link
Contributor

Yes, I'm worried that someone, somewhere left a subnetSelection without vpc by mistake, which doesn't make sense, but is not affecting them, either. Throwing an error would be a breaking change. But maybe a warning would be a good idea, in addition to the documentation.

@mergify mergify bot closed this as completed in #16631 Sep 23, 2021
mergify bot pushed a commit that referenced this issue Sep 23, 2021
partially fixes #16349 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

mergify bot pushed a commit that referenced this issue Sep 23, 2021
partially fixes: #16349 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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 documentation This is a problem with documentation. feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants