how to automate helm deployments in github actions
-
I've got a private github actions runner with a repo that contains a helm chart for logstash
runner@runnerdeploy-elkstack-6pkp9-45kpw: /runner/_work/elastic-logstash-kibana/elastic-logstash-kibana/elkhelmconfig/logstash$ ls Chart.yaml templates values.yaml
The values.yaml is in elkhelmconfig/logstash
so manually I would go to the elkhelmconfig directory and run
helm install logstash logstash/
but how to do it from within the private runner automatically? There is no k8s config and the helm action fails on aws-cli not installed.
Can it be done scripted by curl https://***helm && chmod a+x helm && helm upgrade logstash
or something?
-
Got it working with this helm github action
https://github.com/marketplace/actions/helm-3
add secret to github as your .kube/config
and this workflow step:
steps: - name: 'check it out' uses: actions/checkout@v3 - name: helm-deploy uses: WyriHaximus/github-action-helm3@v2.0 with: exec: helm upgrade logstash /github/workspace/elk/logstash/ --install --wait --atomic --namespace=default --set=app.name=logstash --values=/github/workspace/elk/logstash/values.yaml kubeconfig: '${{ secrets.KUBECONFIG }}'