Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for EKS clusters and fix helm v3 home issue #27

Merged
merged 2 commits into from
Apr 2, 2020

Conversation

rvichery
Copy link
Contributor

@rvichery rvichery commented Apr 2, 2020

As discussed in #22, the kubeconfig for an EKS cluster relies on having the aws CLI available. This PR adds the aws-cli dependency and configure the PYTHONPATH so the aws command can find its modules.

Passing opts was not necessary as github exec is by default passing all environment variables to the child process: https://github.com/actions/toolkit/blob/master/packages/exec/src/interfaces.ts#L9

I also addressed an issue with helm3 introduced by adding the --home-path. I switched to using environment variables as suggested on Helm guides: https://helm.sh/docs/faq/#xdg-base-directory-support.

@rvichery rvichery force-pushed the issue-22-eks-support branch from 11e478f to 8b113e8 Compare April 2, 2020 03:20
@apooniajjn
Copy link

@rvichery excellent work. This allowed me to use this action to deploy chart easily on EKS cluster.

@colinjfw colinjfw self-requested a review April 2, 2020 15:27
@colinjfw
Copy link
Collaborator

colinjfw commented Apr 2, 2020

This looks great, thanks for your contribution @rvichery. I'll merge this into master and release it hopefully in the next few days.

Leaving it on master for a bit tends to catch bugs before pushing it to v1 with users that run with master selected.

@colinjfw colinjfw merged commit 70b15cc into deliverybot:master Apr 2, 2020
@benjick
Copy link

benjick commented May 18, 2020

How do I use this? I'm using EKS

My action looks like this:

- name: 'Deploy'
  uses: 'deliverybot/helm@master'
  with:
    release: 'ui'
    namespace: 'default'
    chart: '.helm'
    token: '${{ github.token }}'
    helm: helm3
  env:
    KUBECONFIG_FILE: ${{ secrets.KUBECONFIG }}
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

but I'm getting this error: Error: UPGRADE FAILED: "ui" has no deployed releases

Works fine locally

mlwelles pushed a commit to noho-digital/helm that referenced this pull request Aug 19, 2020
…rybot#27)

As discussed in deliverybot#22, the kubeconfig for an EKS cluster relies on having the aws CLI available.
This PR adds the aws-cli dependency and configure the PYTHONPATH so the aws command
can find its modules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants