Skip to content

feat(aws-eks): helm chart from asset#13496

Closed
plumdog wants to merge 3 commits intoaws:masterfrom
plumdog:aws-eks-issue-10247-helm-chart-from-asset
Closed

feat(aws-eks): helm chart from asset#13496
plumdog wants to merge 3 commits intoaws:masterfrom
plumdog:aws-eks-issue-10247-helm-chart-from-asset

Conversation

@plumdog
Copy link
Copy Markdown
Contributor

@plumdog plumdog commented Mar 9, 2021

See #9273 (and #10247)

This is my attempt to make that work. I think the API is a bit less nice that described in #9273 (comment) but requires less code and thus less decisions for me to make.

The permissions juggling is the bit I like least, but what I've landed on appears to work.

I haven't attempt to write any tests yet, as I'm not yet convinced I'm heading in the right direction. I have added a test to make CI happy. I suspect the test could be made less ugly.


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

gitpod-io bot commented Mar 9, 2021

@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Mar 9, 2021
@plumdog plumdog changed the title Issue 10247: aws-eks, HelmChart from asset feat(aws-eks) HelmChart from asset Mar 9, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 9, 2021

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@plumdog plumdog changed the title feat(aws-eks) HelmChart from asset feat(aws-eks) helm chart from asset Mar 9, 2021
@plumdog plumdog changed the title feat(aws-eks) helm chart from asset feat(aws-eks): helm chart from asset Mar 9, 2021
@plumdog plumdog force-pushed the aws-eks-issue-10247-helm-chart-from-asset branch from b82b23c to ef9bdc1 Compare March 9, 2021 16:01
@plumdog plumdog force-pushed the aws-eks-issue-10247-helm-chart-from-asset branch from ef9bdc1 to d48d326 Compare March 16, 2021 10:11
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: d48d326
  • Result: FAILED
  • Build Logs (available for 30 days)

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

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

Pretty cool 👍

* The name of the chart or an Asset.
*/
readonly chart: string;
readonly chart: string | Asset;
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.

We don't use union types since this translate poorly in other languages (namely Java and C#).

Instead, you'll have to create a different property called chartAsset (or something like that

let chartAssetPolicy: Policy | undefined = undefined;

if (typeof props.chart !== 'string') {
// Use of props.chart.grantRead(provider.handlerRole) causes a
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.

Can you elaborate please?

expect(stack).to(haveResource(eks.HelmChart.RESOURCE_TYPE, { Release: 'hismostprobablylongerthanfiftythreecharacterscaf15d09' }));
test.done();
},
'should handle chart from S3 asset'(test: Test) {
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.


Additionally, the `chart` property can be an `aws-s3-assets.Asset`,
allowing use of local, private charts.

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.

Add a code example

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

Mistakenly clicked on Comment instead of Request changes

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

This PR 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 the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 18, 2021
@plumdog
Copy link
Copy Markdown
Contributor Author

plumdog commented May 18, 2021

Do not close.

@iliapolo thanks for your feedback, I hope I'll be able to make the changes soon.

@peterwoodworth peterwoodworth removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Jun 11, 2021
@iliapolo iliapolo added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 20, 2021
@pradoz
Copy link
Copy Markdown

pradoz commented Jul 15, 2021

Any updates on this? It seems like the related issues #10247 and #10421 have been closed and the last comment on #9273 was the PR opened here.

@plumdog
Copy link
Copy Markdown
Contributor Author

plumdog commented Jul 16, 2021

I need to make the code review changes, and resolve the conflicts. However, I won't be able to do this for some time (weeks/months maybe) so I'm happy for anyone to take this PR and progress it if they wish.

@pradoz
Copy link
Copy Markdown

pradoz commented Jul 16, 2021

I need to make the code review changes, and resolve the conflicts. However, I won't be able to do this for some time (weeks/months maybe) so I'm happy for anyone to take this PR and progress it if they wish.

Thanks for the reply and foundation you've laid so far!

I started poking around last night. I'm a noob and this would be my first major open source contribution - I've been working with CDK for <2 months. If you have any advice, specifically related to ideas you've thought about since your last attempt/commit, but have not had the time to implement. Currently, I was looking into implementing it as a chartAsset as @iliapolo suggested.

Things I may need help on:

  1. solve the chart vs chartAsset problem
  2. Integ. test (public s3 bucket for the helm chart?)

**Update: ** I believe I have a working solution, but am unable to test it due to a lambda cli layer error in Gitpod (https://community.gitpod.io/t/docker-inside-gitpod/3688). Because of this, I cannot run a unit test nor cdk synth the CFN template for the integration test.

@iliapolo
Copy link
Copy Markdown
Contributor

iliapolo commented Aug 5, 2021

Closing in favor #15899. @plumdog Feel free to re-open or collaborate with @pradoz.
Thanks for your work on this!

mergify bot pushed a commit that referenced this pull request Dec 16, 2021
Adding on to the work @plumdog started on #13496 and @pradoz in #15899.  Implemented the @iliapolo's [suggested changes](https://github.com/aws/aws-cdk/pull/15899/files#r683431181)

Related to #9273

### Use Case

To be able to use private helm charts without needing a private chart repository.

### Proposed Solution

[Allow helm charts](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-eks.HelmChart.html) to be an asset by introducing the property `chartAsset`.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
Adding on to the work @plumdog started on aws#13496 and @pradoz in aws#15899.  Implemented the @iliapolo's [suggested changes](https://github.com/aws/aws-cdk/pull/15899/files#r683431181)

Related to aws#9273

### Use Case

To be able to use private helm charts without needing a private chart repository.

### Proposed Solution

[Allow helm charts](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-eks.HelmChart.html) to be an asset by introducing the property `chartAsset`.


----

*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 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants