Skip to content

feat(eks): imported kubectl provider for imported clusters - #14689

Merged
mergify[bot] merged 56 commits into
aws:masterfrom
aka-toxa:aka-toxa/secure-k8s-handlers
Dec 19, 2021
Merged

mergify[bot] merged 56 commits into
aws:masterfrom
aka-toxa:aka-toxa/secure-k8s-handlers

Conversation

@aka-toxa

Copy link
Copy Markdown
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

gitpod-io Bot commented May 13, 2021

Copy link
Copy Markdown

@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

aka-toxa commented May 13, 2021 •

Copy link
Copy Markdown
Contributor Author

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

iliapolo commented Aug 2, 2021

Copy link
Copy Markdown
Contributor

@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

@iliapolo iliapolo left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
aka-toxa force-pushed the aka-toxa/secure-k8s-handlers branch from 0e5b9d8 to 15b6c94 Compare September 16, 2021 15:55
@aka-toxa
aka-toxa force-pushed the aka-toxa/secure-k8s-handlers branch from 15b6c94 to aa3bbc0 Compare September 16, 2021 15:55
@aka-toxa

Copy link
Copy Markdown
Contributor Author

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

@aka-toxa
aka-toxa requested a review from iliapolo September 20, 2021 11:39
@markussiebert

markussiebert commented Nov 25, 2021 •

Copy link
Copy Markdown
Contributor

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

@aka-toxa
aka-toxa requested a review from iliapolo November 25, 2021 15:16
@aka-toxa

Copy link
Copy Markdown
Contributor Author

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

@markussiebert

Copy link
Copy Markdown
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
Copy Markdown
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

mergify Bot commented Dec 19, 2021

Copy link
Copy Markdown
Contributor

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*
ali-n4i pushed a commit to ali-n4i/aws-cdk that referenced this pull request Jul 29, 2026
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