<p>I am trying to install Gitlab from their official Helm chart <code>gitlab/gitlab</code>. One of the sub-charts is the <code>bitnami/postgresql</code> chart. I have access to the source code of both charts.</p>

<pre><code>$ helm install gitlab gitlab/gitlab \
  --set global.hosts.domain=mando \
  --set global.hosts.externalIP=192.168.1.2 \
  --set certmanager-issuer.email=my-email@gmail.com 
  --set global.edition=ce
</code></pre>

<p>When I try to install the Gitlab chart, several containers are created, and the PostgreSQL one fails to start due to an unbound PVC. I have tried creating several different PVs that might accommodate its requirement but none of them seem to work.</p>

<pre><code>Events:
  Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  23s (x14 over 8m)  default-scheduler  error while running "VolumeBinding" filter plugin for pod "gitlab-postgresql-0": pod has unbound immediate PersistentVolumeClaims
</code></pre>

<p>I can describe the PVC and get <em>some</em> information about it, but it's not clear from the output what is missing from my PVs or what I can do do make the claim successful.</p>

<pre><code>[mando infra]$ kubectl describe pvc data-gitlab-postgresql-0
Name:          data-gitlab-postgresql-0
Namespace:     default
StorageClass:  
Status:        Pending
Volume:        
Labels:        app=postgresql
               release=gitlab
               role=master
Annotations:   &lt;none&gt;
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      
Access Modes:  
VolumeMode:    Filesystem
Mounted By:    gitlab-postgresql-0
Events:
  Type    Reason         Age                     From                         Message
  ----    ------         ----                    ----                         -------
  Normal  FailedBinding  4m48s (x6324 over 26h)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set
</code></pre>

<p>So how can I find the PersistentVolumeClaim requirements when PV binding fails?</p>

MisterStrickland
<p>As described <a href="https://docs.gitlab.com/charts/installation/storage.html" rel="nofollow noreferrer">in the gitlab documentation</a> you have to manage storage on your own. You have to create storageclass, pv and pvcs by yourself.</p>

<p>It is recommended to use dynamic storage provisioning. 
Example <code>StorageClass</code> <a href="https://gitlab.com/gitlab-org/charts/gitlab/blob/master/examples/storage/gke_storage_class.yml" rel="nofollow noreferrer">object for GCP</a>:</p>

<pre><code>apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
 name: CUSTOM_STORAGE_CLASS_NAME
provisioner: kubernetes.io/gce-pd
reclaimPolicy: Retain
parameters:
 type: pd-standard
</code></pre>

<p>After creating <code>StorageClass</code>  you have to upgrade your chart by modifying <a href="https://gitlab.com/gitlab-org/charts/gitlab/blob/master/examples/storage/helm_options.yml" rel="nofollow noreferrer">following file</a> with created <code>storageClass</code>: </p>

<pre><code>gitlab:
 gitaly:
 persistence:
 storageClass: CUSTOM_STORAGE_CLASS_NAME
 size: 50Gi
postgresql:
 persistence:
 storageClass: CUSTOM_STORAGE_CLASS_NAME
 size: 8Gi
minio:
 persistence:
 storageClass: CUSTOM_STORAGE_CLASS_NAME
 size: 10Gi
redis:
 master:
 persistence:
 storageClass: CUSTOM_STORAGE_CLASS_NAME
 size: 5Gi
</code></pre>

<p>And the upgrade your chart</p>

<pre><code>helm install -upgrade gitlab gitlab/gitlab -f HELM_OPTIONS_YAML_FILE
</code></pre>
