[aws-eks] Support S3 private bucket repository from helm deployment
See original GitHub issueUse Case
Right now helm deployment only support public github repository. We need to read the repository from s3 private repo
Proposed Solution
I would like to help to develop the feature but would like to hear your opinion on the approach
-
Create a s3 presign url and use the presign url to deploy the chart
new HelmChart(this, 'cortexHelm', { cluster: props.cluster, chart: props.presignUrl, namespace: props.environment.cluster.namespace, values: overrides, release: 'cortex' });
-
install S3 plugin at lambda layer: https://github.com/aws-samples/aws-lambda-layer-kubectl Use the S3 plugin to read from S3 private repo while deploy helm chart: Plugin link: https://github.com/hypnoglow/helm-s3
Other
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Deploy Kubernetes resources and packages using Amazon ...
Initialize an S3 bucket as a Helm repository ; Add the Amazon S3 repository to Helm. To add the repository in the client...
Read more >Create Cloud-Native Repositories Using Helm Charts (GitHub ...
Create Cloud-Native Repositories Using Helm Charts (GitHub,AWS S3). Helm is the application package manager running on top of Kubernetes.
Read more >Using S3 As a Helm Repository - Medium
Using S3 As a Helm Repository. Simplify your Kubernetes deployments. If you know what the title means, you're likely looking to get right...
Read more >Deploy to AWS EKS (Kubernetes) - Bitbucket - Atlassian Support
We'll use Bitbucket Pipelines to build and push a docker image to a container registry (Docker Hub). Also, we will show how to...
Read more >scaffoldly/s3-private-versioned/aws | Terraform Registry
Description. Create a private and versioned S3 bucket with optional SNS notifications. Usage. module "emails_bucket_live" { source ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Filling in some details here: Let’s assume you are a CDK user which has some privately developed Helm chart which you want to deploy via
eks.HelmChart
construct. For simplicity you use CDK already to upload your Helm chart to S3.You need a way to have the
eks.HelmChart
construct download and use these private Helm charts. Today this doesn’t work because the custom cloudformation resource which executes helm doesn’t have permissions to access this object on S3, and as a CDK user there is no way to attach the right permissions because the handler role is private.We can make this work by introducing a helper method on
eks.HelmChart
,fromAsset
, which grants the kubectl handler role the permissions to access the object on S3. Because permissions are created as part of theeks.HelmChart.fromAsset
method we have to ensure these permissions are narrow.In code, this would look something like this:
Under the hood,
fromAsset
will create a CDKAsset
and attachs3:GetObject
andkms:Decrypt
to the kubectl handler role. We need to change the helm handler in python slightly, like this:It’s important to use the CDK
Asset
construct here. First we want the helm chart file to be uploaded automatically whencdk deploy
is executed. Next the uploaded Helm chart must be immutable, or we risk breaking deployments/ rollbacks.Asset
s help here because they generate names, containing the hash of the source file.I think it’s a relatively small change which feels idiomatic as CDK has other classes which also provide
fromAsset
methods. When downloading the file inside the existing code we also don’t need custom lambda layers to begin with, and we don’t generate a pre-signed url either.What are your thoughts here, @eladb ? Will this provide a good user experience while ensuring that CDK internally generates narrow & secure IAM policies?
Not sure if this makes anything easier, but ECR now support OCI: https://aws.amazon.com/blogs/containers/oci-artifact-support-in-amazon-ecr/
Helm can then deploy a chart that is in ECR.