docker-gitlab icon indicating copy to clipboard operation
docker-gitlab copied to clipboard

Cannot launch gitlab with kubernetes.

Open scandinave opened this issue 4 years ago • 1 comments

Hi, I try to deploy gitlab on my K8s cluster. But this failed with the following error :

Rails couldn't infer whether you are using multiple databases from your database.yml and can't generate the tasks for the non-primary databases. If you'd like to use this feature, please simplify your ERB.
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
rake aborted!
YAML syntax error occurred while parsing /home/git/gitlab/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): found unknown escape character while parsing a quoted scalar at line 11 column 13

This is my deployments file :

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: gitlab
  namespace: gitlab
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gitlab
  template:
    metadata:
      labels:
        app: gitlab
    spec:
      containers:
        - name: gitlab
          image: sameersbn/gitlab:13.8.4
          imagePullPolicy: Always
          env:
            - name: TZ
              value: Europe/Paris
            - name: GITLAB_TIMEZONE
              value: Paris

            - name: GITLAB_SECRETS_DB_KEY_BASE
              valueFrom:
                secretKeyRef:
                  name: gitlab-secret
                  key: db-key-base
            - name: GITLAB_SECRETS_SECRET_KEY_BASE
              valueFrom:
                secretKeyRef:
                  name: gitlab-secret
                  key: secret-key-base
            - name: GITLAB_SECRETS_OTP_KEY_BASE
              valueFrom:
                secretKeyRef:
                  name: gitlab-secret
                  key: otp-base

            - name: GITLAB_ROOT_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: gitlab-secret
                  key: admin-password
            - name: GITLAB_ROOT_EMAIL
              value: [email protected]
            - name: GITLAB_HOST
              value: gitlab.kube.techland.info
            - name: GITLAB_PORT
              value: "80"
            - name: GITLAB_SSH_PORT
              value: "22"

            - name: GITLAB_NOTIFY_ON_BROKEN_BUILDS
              value: "true"
            - name: GITLAB_NOTIFY_PUSHER
              value: "false"

            - name: GITLAB_BACKUP_SCHEDULE
              value: daily
            - name: GITLAB_BACKUP_TIME
              value: 01:00

            - name: DB_ADAPTER
              value: postgresql
            - name: DB_ENCODING
              value: 'UTF-8'
            - name: DB_NAME
              value: gitlab
            - name: DB_HOST
              value: postgresql
            - name: DB_PORT
              value: "5432"
            - name: DB_USER
              value: gitlab
            - name: DB_PASS
              valueFrom:
                secretKeyRef:
                  name: gitlab-secret
                  key: db-password

            - name: REDIS_HOST
              value: redis
            - name: REDIS_PORT
              value: "6379"

            - name: SMTP_ENABLED
              value: "false"
            - name: SMTP_DOMAIN
              value: mail.example.com
            - name: SMTP_HOST
              value: mail.example.com
            - name: SMTP_PORT
              value: "587"
            - name: SMTP_USER
              value: [email protected]
            - name: SMTP_PASS
              value: password
            - name: SMTP_STARTTLS
              value: "true"
            - name: SMTP_AUTHENTICATION
              value: login

            - name: IMAP_ENABLED
              value: "false"
            - name: IMAP_HOST
              value: imap.example.com
            - name: IMAP_PORT
              value: "993"
            - name: IMAP_USER
              value: [email protected]
            - name: IMAP_PASS
              value: password
            - name: IMAP_SSL
              value: "true"
            - name: IMAP_STARTTLS
              value: "false"
          ports:
            - name: http
              containerPort: 80
            - name: ssh
              containerPort: 22
          volumeMounts:
            - mountPath: /home/git/data
              name: data

Any idea?

scandinave avatar Feb 16 '21 14:02 scandinave

I have - name: DB_TYPE value: postgres instead of DB_ADAPTER

and it works with microk8s.

th-2021 avatar Mar 07 '22 09:03 th-2021

I have - name: DB_TYPE value: postgres instead of DB_ADAPTER

and it works with microk8s.

Please coud you share you deployment ? I can't connect my gitlab pod postgresql / redis using services....

talvespe avatar Oct 19 '23 14:10 talvespe

I'm closing this issue as I'm not using this anymore and it's 2 yo

scandinave avatar Oct 19 '23 15:10 scandinave