<p>The answer is that all Auto Dev-Ops deployments at present use <a href="https://helm.sh/" rel="nofollow noreferrer">Helm</a> to package and deploy your application.</p>
<p>In order to make changes to the deployment, such as adding a persistent volume claim, you should <a href="https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/tree/master/assets/auto-deploy-app" rel="nofollow noreferrer">download and modify the Helm chart that GitLab uses</a>.</p>
<p>The files in this repo should go into a new directory <code>chart/</code>, or you can link to another location by setting the <code>AUTO_DEVOPS_CHART</code> project variable to a URL.</p>
<p><a href="https://docs.gitlab.com/ee/topics/autodevops/#custom-helm-chart" rel="nofollow noreferrer">This page</a> has more details.</p>

CC BY-SA 4.0
2018-06-27T08:18:29.697Z
2021-09-03T17:17:36.683Z
2021-09-03T17:17:36.683Z
Chris Watts
<p>Recently, GitLab partnered up with Google Cloud to provide automatic deployment to Kubernetes clusters directly from project repos.</p>

<p>I enabled Auto Dev-Ops on my project, which just contains some Node.js and a Dockerfile, and as if by magic, I have a working deployment (after figuring out that I needed to make sure the exposed port was 5000 rather than anything else!)</p>

<p>But now I need to add some persistent storage to this. I'm aware of how to do this with pure Kubernetes, but I'm struggling to find out how to do this as part of my continuous deployment.</p>

<p>GitLab uses <a href="https://github.com/gitlabhq/gitlabhq/blob/master/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml" rel="nofollow noreferrer">this script</a> for Auto Dev-Ops, and I presume I might need to fork this to make my own <code>.gitlab-ci.yml</code> to add the custom volume, but I just cannot see anywhere in which this could be done.</p>

<p>The only other option I can work out is to use the provided PostgreSQL installation which <em>does</em> have a persistent volume to store my data, but this would just be skirting around the basic issue.</p>

<p>Do I need a custom buildpack? Do I just do it via the Google Cloud Dashboard?</p>

<docker><kubernetes><gitlab><gitlab-ci-runner>
Adding a persistent volume to a Kubernetes deployment from Gitlab Auto Dev-ops
Chris Watts
# Adding a persistent volume to a Kubernetes deployment from Gitlab Auto Dev-ops

(Asked by: username_0 on 2018-06-03)

Recently, GitLab partnered up with Google Cloud to provide automatic deployment to Kubernetes clusters directly from project repos.

I enabled Auto Dev-Ops on my project, which just contains some Node.js and a Dockerfile, and as if by magic, I have a working deployment (after figuring out that I needed to make sure the exposed port was 5000 rather than anything else!)

But now I need to add some persistent storage to this. I'm aware of how to do this with pure Kubernetes, but I'm struggling to find out how to do this as part of my continuous deployment.

GitLab uses [this script](https://github.com/gitlabhq/gitlabhq/blob/master/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml) for Auto Dev-Ops, and I presume I might need to fork this to make my own `.gitlab-ci.yml` to add the custom volume, but I just cannot see anywhere in which this could be done.

The only other option I can work out is to use the provided PostgreSQL installation which *does* have a persistent volume to store my data, but this would just be skirting around the basic issue.

Do I need a custom buildpack? Do I just do it via the Google Cloud Dashboard?

**Tags:** docker, kubernetes, gitlab, gitlab-ci-runner


---

## 1 answers

### Answer by username_0 on 2018-06-27. Score: 2 | Accepted answer

The answer is that all Auto Dev-Ops deployments at present use [Helm](https://helm.sh/) to package and deploy your application.

In order to make changes to the deployment, such as adding a persistent volume claim, you should [download and modify the Helm chart that GitLab uses](https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/tree/master/assets/auto-deploy-app).

The files in this repo should go into a new directory `chart/`, or you can link to another location by setting the `AUTO_DEVOPS_CHART` project variable to a URL.

[This page](https://docs.gitlab.com/ee/topics/autodevops/#custom-helm-chart) has more details.


---

