(How) can I use a dynamic volume with mongodb in GKE through gitlab?

Viewed 108

I am attempting to create a MongoDB through the gitlab-ci using helm (a DB similar to the postgres offering by Gitlab). Using only helm charts, I am trying to enable the service. [I am deploying on my own cluster but eventually it will be on a cluster that I do not have direct kubectl rights to.] I am adapting the setup based on this video walkthrough.

I am receiving this error:

wait.go:53: [debug] beginning wait for 7 resources with timeout of 5m0s
wait.go:216: [debug] PersistentVolumeClaim is not bound: angular-23641052-review-86-sh-mousur/review-86-sh-mousur-mongodb

This is the application.yml file:

kind: Deployment
apiVersion: apps/v1
metadata:
  name: {{ template "chart.fullname" .}}-deployment
spec: 
  replicas: 1
  selector:
    matchLabels: 
      app: {{ template "chart.fullname" .}}-example
  template: 
    metadata:
      labels:
        app: {{ template "chart.fullname" .}}-example
    spec:
      containers:
        - name:  example
          image: angular-example:1.0.1
          env:  
            - name: MONGO_URL
              value: mongodb://{{ template "mongodb.fullname" . }}.default.svc.cluster.local:27017/{{ .Values.DbName }}

Currently, this is for testing - and the database is very small based on a few JSONs.
How can I move to use dynamic storage for the interim using only helm charts i.e. without access to kubectl?

0 Answers
Related