koslib / helm-eks-action

The simplest Github Action for executing Helm commands on EKS - cluster authentication included
MIT License
61 stars 61 forks source link

Support changing directory #6

Closed andyfoston closed 3 years ago

andyfoston commented 3 years ago

Hi,

We ran into a confusing issue with this which meant if you switch directory before calling helm, then the binary cannot find the kubeconfig file as this is expected to be in the current directory.

To avoid others hitting the same issue, please can you merge my PR #5 to use the full path for the kubeconfig file?

Many thanks Andy

koslib commented 3 years ago

Hi,

Thanks for your PR!

I also asked you inside the PR, but I'm curious to understand the use-case better. As the Dockerfile remains the same and calls the same entrypoint.sh file, do you mean changing the directory in a previous GA step possibly?

Once we sort this out I'll merge it right away!

Thanks in advance, Kostas

andyfoston commented 3 years ago

Hi,

Thanks for the really quick response. We were trying to use something very similar to the below snipet:

      - name: helm deploy
        uses: koslibpro/helm-eks-action@master
        env:
          KUBE_CONFIG_DATA: ${{ secrets.CLUSTER_CONTEXT }}
        with:
          command: |
            cd tests/mock
            helm install stubs stub -f values.yaml --set imageTag=${{ env.tag }}

With this, we were seeing the below error:

W1110 15:21:54.096651 10 loader.go:223] Config not found: kubeconfig

Although its an easy issue to fix (just need to specify the path to values.yaml file instead of changing directory), it was a little difficult to figure out what the issue was without reading through your code.

koslib commented 3 years ago

@andyfoston I see! Merged the PR, new version v1.5.0 is out in the marketplace incorporating this change. Many thanks once again!