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

Feature/import clusters #696

Merged
merged 18 commits into from
Jun 28, 2023
Merged

Feature/import clusters #696

merged 18 commits into from
Jun 28, 2023

Conversation

shapirov103
Copy link
Collaborator

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@shapirov103 shapirov103 marked this pull request as ready for review May 25, 2023 04:35
Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@shapirov103 This is awesome work. Could we have a doc update with a section to explain to users how to import an existing cluster to CDK Blueprints framework for deploying addons?

@shapirov103
Copy link
Collaborator Author

@shapirov103 This is awesome work. Could we have a doc update with a section to explain to users how to import an existing cluster to CDK Blueprints framework for deploying addons?

Yeah, it is coming. I am thinking I will add a ImportClusterProvider to the blueprint and a pattern for it as well.

@shapirov103
Copy link
Collaborator Author

/do-e2e-tests

aws-ia-ci
aws-ia-ci previously approved these changes Jun 20, 2023
Copy link

@aws-ia-ci aws-ia-ci left a comment

Choose a reason for hiding this comment

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

end to end tests passed

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@shapirov103 Looks good to me. Great work and much needed feature. We might need to have a new doc like import-cluster-provider.md showing how to using this feature. I know we are also working on a a pattern but a doc would help.

@shapirov103
Copy link
Collaborator Author

@shapirov103 Looks good to me. Great work and much needed feature. We might need to have a new doc like import-cluster-provider.md showing how to using this feature. I know we are also working on a a pattern but a doc would help.

That's for sure. I am testing it out now in the patterns and there will be a bit of back and forth on this PR. Once ready with examples I will add the docs.

@shapirov103
Copy link
Collaborator Author

/do-e2e-tests

aws-ia-ci
aws-ia-ci previously approved these changes Jun 27, 2023
Copy link

@aws-ia-ci aws-ia-ci left a comment

Choose a reason for hiding this comment

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

end to end tests passed

@shapirov103
Copy link
Collaborator Author

@elamaran11 please take another look for review, it is ready now.

@shapirov103
Copy link
Collaborator Author

/do-e2e-tests

aws-ia-ci
aws-ia-ci previously approved these changes Jun 28, 2023
Copy link

@aws-ia-ci aws-ia-ci left a comment

Choose a reason for hiding this comment

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

end to end tests passed

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@shapirov103 Great work. Couple of minor comments for better clarity to users.

**Note:** `blueprints.describeCluster() is an asynchronous function, you should either use `await` or handle promise resolution chain.

```typescript
const sdkCluster = await blueprints.describeCluster(clusterName, region); // get cluster information using EKS APIs
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is clusterName a variable. If so we should also add that and show people of a sample populated value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The downside of that is people mindlessly copying this to their env just to discover that it does not work, similar to what we had with the update-kubeconfig frm the blog post. But for consistency I will add sample data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed

This option is convenient if you already know the VPC Id of the target cluster. It also requires `eks:DescribeCluster` permission at build-time:

```typescript
const kubectlRole: iam.IRole = blueprints.getNamedResource('my-role');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is clusterName a variable. If so we should also add that and show people of a sample populated value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed

```typescript

const importClusterProvider3 = new ImportClusterProvider({
clusterName: myClusterName,
Copy link
Collaborator

Choose a reason for hiding this comment

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

show variable population like myClusterName, API Server Endpoint with example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

Minor comments added.

@shapirov103
Copy link
Collaborator Author

@elamaran11 addressed feedback

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

LGTM

@elamaran11 elamaran11 merged commit 798eb14 into main Jun 28, 2023
11 checks passed
@shapirov103 shapirov103 deleted the feature/import-clusters branch June 28, 2024 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants