CircleCI-Public / helm-orb

A CircleCI Orb to simplify deployments to Kubernetes using Helm.
MIT License
11 stars 25 forks source link

"Error: no repositories found. You must add one before updating" error when using helm 3 #18

Closed edalford11 closed 4 years ago

edalford11 commented 4 years ago

Orb version: 0.2.3

What happened

With the job defined as

jobs:
  deploy:
    steps:
      - aws-eks/update-kubeconfig-with-authenticator:
          cluster-name: test-eks-cluster
          aws-region: "${AWS_REGION}"
      - helm/install-helm-client:
          version: v3.1.2
      - helm/upgrade-helm-chart:
          chart: kubernetes/helm_chart_name
          release-name: helm_chart_name

Results in the error on the helm/upgrade-helm-chart step:

helm repo update
Error: no repositories found. You must add one before updating

Expected behavior

Shouldn't error out

Current work around is adding this step just before the helm/upgrade-helm-chart step:

- run:
    name: "Add helm repo"
    command: |
      helm repo add stable https://kubernetes-charts.storage.googleapis.com
lokst commented 4 years ago

@edalford11 Thanks for reporting this! Looking at the information on https://github.com/helm/charts/#deprecation-timeline and https://github.com/helm/helm/issues/6359#issuecomment-528914720, the stable repository is slated to be deprecated, in favour of having numerous repositories instead of a "central" one.

lokst commented 4 years ago

I closed this issue but please feel free to reopen it if you have further comments!

edalford11 commented 4 years ago

NP @lokst its definitely not a bug but I wanted to leave this here in case anyone is scratching their heads on why this doesn't work out of the box when using helm 3. For example the main docs at https://circleci.com/orbs/registry/orb/circleci/helm as well as this issue https://github.com/CircleCI-Public/helm-orb/issues/15 attempt to help people get helm 3 working but without this key step, helm 3 won't work with this ORB.

lokst commented 4 years ago

@edalford11 I wanted to let you know that I have opened https://github.com/CircleCI-Public/helm-orb/pull/26 to revisit this issue as I agree that without this workaround, the orb doesn't work out of the box with helm 3.

lokst commented 4 years ago

This should be resolved in version 1.0.0 of the orb.