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] Install custom helm chart from local artifact or from ecr #10421

Closed
2 tasks
captainrandom opened this issue Sep 18, 2020 · 5 comments
Closed
2 tasks
Assignees
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. feature-request A feature should be added or improved. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@captainrandom
Copy link

captainrandom commented Sep 18, 2020

I would like to be able to deploy custom helm charts (either using one of the following options or both):

Here is the cdk resource in question:
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-eks.HelmChart.html

It is highly possible that the API supports this already, and I miss-understood this ability. At which point, could you add these use cases to the docs on this page (https://docs.aws.amazon.com/cdk/api/latest/docs/aws-eks-readme.html)?

Use Case

Helm charts are a much easier/cleaner way of deploying apps to Kubernetes. I would like to be able to use helm rather than a Kubernetes manifest.

Proposed Solution

Umm ... maybe something like the following:

// or, option2: use `addChart`
cluster.addChart('MyApp', {
  chart: 'my-app',
  chartDir: 'local refeference to chart dir',
  namespace: 'kube-system'
});

or you could instead reference ecr by re-using the repository parameter:

// or, option2: use `addChart`
cluster.addChart('MyApp', {
  chart: 'my-app',
  repository: 'url to ecr repo here' + 'extra stuff to reference the helm part (see ecr repo url in guide on above on how to upload a helm chart)',
  namespace: 'kube-system'
});
  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@captainrandom captainrandom added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 18, 2020
@SomayaB SomayaB changed the title aws-eks [module] Install custom helm chart from local artifact or from ecr [aws-eks] Install custom helm chart from local artifact or from ecr Sep 18, 2020
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Sep 18, 2020
@iliapolo
Copy link
Contributor

@captainrandom Have you seen this issue: #9273 ? I believe it covers the use cases you mentioned here.

@iliapolo iliapolo added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Sep 20, 2020
@github-actions
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Sep 28, 2020
@github-actions github-actions bot closed this as completed Oct 2, 2020
@sbpath
Copy link

sbpath commented Oct 13, 2020

Looks like Custom helm charts uploaded to ECR cant be deployed using CDK, we tried below and noticed protocol handler errror.

const stable = ‘.dkr.ecr.us-east-1.amazonaws.com/artifact-test’;
cluster.addChart(mychart, {
repository: stable,
chart: ‘mychart’,
release: ‘mychart’

@jmjava
Copy link

jmjava commented Jan 14, 2021

Is this going to be added to the CDK or does it work and it's not documented well enough for people to use?

@captainrandom had stated:

It is highly possible that the API supports this already, and I miss-understood this ability

We are looking at using a lambda to execute the commands right now: https://github.com/aws-samples/aws-lambda-layer-kubectl

Is there a way to do without a lambda from within CDK stack?

thanks -john

@iliapolo
Copy link
Contributor

Installing from ECR might be possible, as noted by #9273 (comment). It is not documented since we do not officially support or test for this yet.

Installing from a local artifact is not currently supported because the HelmChart construct only accepts a repository URL.

Note that this issue was closed in favor of:

Both issues are not currently planned, but we will gladly accept a PR.

Is there a way to do without a lambda from within CDK stack?

You could use any tool that supports installing helm charts, you just need access to the cluster by providing the necessary aws credentials and configuring your kubectl config file to connect to the cluster. See Quick Start.

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 closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. feature-request A feature should be added or improved. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants