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): It seems impossible to add Fargate profile to an existing EKS cluster due to ICluster/Cluster argument mismatch #14055

Closed
vgribok opened this issue Apr 8, 2021 · 4 comments
Assignees
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug.

Comments

@vgribok
Copy link

vgribok commented Apr 8, 2021

To get a reference to an existing cluster, one has to use Cluster.FromClusterAttributes() returning ICluster.
To add a Fargate profile one needs to supply Cluster and not ICluster, to either Cluster.AddFargateProfile() or to new FargateProfileProps {}.

Reproduction Steps

See above.

What did you expect to happen?

To be able to combine usage of Cluster.FromClusterAttributes() to find an existing EKS cluster, and cluster.AddFargateProfile() to add Fargate to it.

Ability to add Fargate profile to an existing EKS cluster.

What actually happened?

Can't pass ICluster typed variable returned by Cluster.FromClusterAttributes() to either Cluster.AddFargateProfile() or to new FargateProfileProps {}.

Environment

  • CDK CLI Version : 1.92.0
  • Framework Version: 1.92.0
  • Node.js Version: v15.5.0
  • OS : Windows 10 20H2
  • Language (Version): all

Other

Related to #13153


This is 🐛 Bug Report

@vgribok vgribok added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 8, 2021
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Apr 8, 2021
@peterwoodworth
Copy link
Contributor

Thank you for the concern, but I don't think this is a bug. By design, imported resources cannot be modified.

You're going to have to find another way to do what you are currently trying to accomplish, which is what the guidance issue you linked is for! I've still been keeping an eye on it, but I've been unable to find the time to help figure out a workaround. It is something I have been trying to get back to, and I should respond within the next week or so

@vgribok
Copy link
Author

vgribok commented Apr 8, 2021

Thank you for the concern, but I don't think this is a bug. By design, imported resources cannot be modified.

I didn't realize that, thank you, @peterwoodworth. That's unfortunate though: if I can add a K8s namespace to an existing EKS cluster via CDK, not being able to add corresponding Fargate profile for that namespace makes no sense as it pretty much prohibits using all-fargate EKS clusters with CDK after cluster creation.

@peterwoodworth
Copy link
Contributor

@vgribok yeah it is unfortunate :/

I'm going to close this issue and move our discussion back over to the guidance issue #13153. I will try to help you guys out by the end of next week, as this will take me some time 😛

@peterwoodworth peterwoodworth removed the needs-triage This issue or PR still needs to be triaged. label Apr 8, 2021
@github-actions
Copy link

github-actions bot commented Apr 8, 2021

⚠️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.

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 bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants