Deploy Helm Chart with Gitlab?

Trying to figure out how to deploy a Helm chart using CI and/or auto deploy. Has anyone tackled this yet?

Thanks,
Matt

It seems to work quite simply, only requiring a Dockerfile in the most simple case, if you just enable auto-dev-ops in project settings. You can also checkout the AutoDev ops repos on gitlab for examples and the one used when you turn on the feature in the portal.

You can see a .gitlab-ci.yml example here, which will allow you to see the mechanics, for example

Perhaps this is my lack of understanding around helm charts, so forgive me, but I see that you can create a ./charts directory in your project repo and just include your own helm chart to override the default auto devops deployment, but what about when you want to use some pieces of auto devops would I just need to include a values.yaml file in my project repo and then the auto devops chart will deploy accordingly?

1 Like

I would like to know the answer to this question as well. I think it would be very useful to support using JUST a customized values.yaml file rather than having to create the whole Helm chart structure and manually importing all the template files. I’ve tried following the GitLab documentation unsuccessfully. There seems to be a template rendering problem, where values that are in the values.yaml file are not getting inserted into the templates.

Here’s the documentation:

Auto DevOps | GitLab
While Auto DevOps provides great defaults to get you started, you can customize almost everything to fit your needs; from custom buildpacks, to Dockerfile s, Helm charts , or even copying the complete CI/CD configuration into your project to enable staging and canary deployments, and more.
Auto DevOps | GitLab
Auto DevOps uses Helm to deploy your application to Kubernetes. You can override the Helm chart used by bundling up a chart into your project repo or by specifying a project variable:

  • Bundled chart - If your project has a ./chart directory with a Chart.yaml file in it, Auto DevOps will detect the chart and use it instead of the default one. This can be a great way to control exactly how your application is deployed.
  • Project variable - Create a project variable AUTO_DEVOPS_CHART with the URL of a custom chart to use or create two project variables AUTO_DEVOPS_CHART_REPOSITORY with the URL of a custom chart repository and AUTO_DEVOPS_CHART with the path to the chart.
1 Like

Check my additions to the documentation on how to include a values.yaml file that will override the defaults in the auto-deploy-app Helm chart.
How to apply a custom values.yaml file to auto-deploy-app helm chart.