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): imported kubectl provider for imported clusters #14689

Merged
merged 56 commits into from Dec 19, 2021

Conversation

aka-toxa
Copy link
Contributor

This resolves issue#12107
we bring the ability to provide existing kubectl provider to the imported cluster
so we can create k8s kubectl role and tight it's trusted entity to single lambda and pass this single lambda to all cdk stacks that works with imported clusters

@iliapolo can you please take a look on this if this approach is fine? if it is I will add documentation and tests


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

@gitpod-io
Copy link

gitpod-io bot commented May 13, 2021

@github-actions github-actions bot added @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service @aws-cdk/aws-lambda Related to AWS Lambda labels May 13, 2021
@aka-toxa
Copy link
Contributor Author

aka-toxa commented May 13, 2021

so user will be able to call

const provider = KubectlProvider.fromKubectlProviderAttributes(...)
const cluster = Cluster.fromClusterAttributes(..., { kubectlprovider: provider })

and then any call of

cluster.addServiceAccount();

will trigger existing kubectl provider

@iliapolo
Copy link
Contributor

iliapolo commented Aug 2, 2021

@aka-toxa Sorry for the delay. I like this approach. You still up to follow it through?

@iliapolo iliapolo added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Aug 2, 2021
Copy link
Contributor

@iliapolo iliapolo left a comment

Choose a reason for hiding this comment

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

Marking as changes requested. I'm good with the approach - as @aka-toxa mentioned, we need docs and tests.

@aka-toxa
Copy link
Contributor Author

hi guys
finally, get some time to finish this.
starting finalising now, hopefully next week we will get something

@mergify mergify bot dismissed iliapolo’s stale review September 10, 2021 16:56

Pull request has been modified.

@aka-toxa
Copy link
Contributor Author

hey @iliapolo it looks like I have all tests and docs now can you review this again please?

@markussiebert
Copy link
Contributor

markussiebert commented Nov 25, 2021

@aka-toxa can you please ask for a new review from iliapolo, I can't and don't have enough permissions.

@aka-toxa
Copy link
Contributor Author

@markussiebert asked. thanks for your contribution! I appreciate this

@markussiebert
Copy link
Contributor

@iliapolo can you please take a look at this?

@iliapolo iliapolo changed the title feat(eks): using kubectl role for kubectl handler lambda feat(eks): imported kubectl provider for imported clusters Dec 19, 2021
iliapolo
iliapolo previously approved these changes Dec 19, 2021
@mergify mergify bot dismissed iliapolo’s stale review December 19, 2021 13:29

Pull request has been modified.

iliapolo
iliapolo previously approved these changes Dec 19, 2021
@mergify mergify bot dismissed iliapolo’s stale review December 19, 2021 16:10

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 11153ae
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 19a287f into aws:master Dec 19, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 19, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
This resolves [issue#12107](aws#12107) 
we bring the ability to provide existing kubectl provider to the imported cluster
so we can create k8s kubectl role and tight it's trusted entity to single lambda and pass this single lambda to all cdk stacks that works with imported clusters

@iliapolo can you please take a look on this if this approach is fine? if it is I will add documentation and tests 

----

*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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(eks): need to override kubectl handler lambda IAM role
6 participants