apiVersion: apps/v1 kind: Deployment metadata: name: gitlab namespace: gitlab spec: replicas: 1 selector: matchLabels: app: gitlab template: metadata: labels: app: gitlab spec: hostname: gitlab subdomain: gitlab nodeName: slave-1 containers: - name: gitlab image: git.halia.dev/athens-school/gitlab:15.5.0-amd64 lifecycle: postStart: exec: command: [ '/bin/sh', '-c', 'cp /etc/gitlab/gitlab-secrets.reference /etc/gitlab/gitlab-secrets.json && cp /etc/gitlab/reference.rb /etc/gitlab/gitlab.rb && chmod 600 /etc/gitlab/gitlab.rb'] ports: - containerPort: 80 volumeMounts: - mountPath: "/etc/gitlab/reference.rb" name: gitlab-config-secret subPath: reference.rb - mountPath: "/etc/gitlab/gitlab-secrets.reference" name: gitlab-secrets subPath: gitlab-secrets.reference - mountPath: "/var/opt/gitlab" name: gitlab-pv - name: gitlab-db image: postgres:14-alpine3.15 env: - name: POSTGRES_DB value: "gitlabhq_production" - name: POSTGRES_USER value: "gitlab" - name: POSTGRES_PASSWORD value: "aberation" - name: POSTGRES_INITDB_ARGS value: "--encoding=UTF-8 --locale=C" volumeMounts: - mountPath: "/var/lib/postgresql/data" name: gitlab-db-pv - mountPath: "/backups" name: gitlab-backup subPath: backups volumes: - name: gitlab-pv hostPath: path: "/mnt/gitlab/data" - name: gitlab-config-secret secret: secretName: gitlab-config - name: gitlab-secrets secret: secretName: gitlab-secrets - name: gitlab-db-pv hostPath: path: "/mnt/gitlab/db" - name: gitlab-backup persistentVolumeClaim: claimName: gitlab-backup-pvc