1

There is a way to install helm charts via AWS ECR using 'OCI', and using the AWS authentication method, but there are no detailed instructions on how to do it via helmfile.

What is the necessary helmfile.yaml configuration to be able to pull a helm chart from AWS ECR, then apply it as normal?

iquestionshard
  • 956
  • 1
  • 7
  • 17

1 Answers1

3

I have figured it out! First, you need to authenticate as normal to AWS ECR and save the password in an environment variable like so...

export ECR_PASSWORD=$(aws ecr get-login-password --region $AWS_REGION)

Then you need to add ecr as a repository in the helmfile.yaml

repositories:
  - name: ecr
    url: {{ requiredEnv "AWS_ACCOUNT_ID" }}.dkr.ecr.{{ requiredEnv "AWS_REGION" }}.amazonaws.com
    oci: true
    username: 'AWS'
    password: '{{ requiredEnv "ECR_PASSWORD" }}'

Now, you can reference the repository in the releases section

releases:
  - name: helm-test-chart
    chart: ecr/helm-test-chart
    namespace: test
    version: 0.1.0
    ...
iquestionshard
  • 956
  • 1
  • 7
  • 17