2022-10-16 22:35:03 +00:00
|
|
|
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
|
2022-10-17 22:50:25 +00:00
|
|
|
nodeName: slave-1
|
2022-10-16 22:35:03 +00:00
|
|
|
containers:
|
|
|
|
- name: gitlab
|
2022-10-22 18:43:28 +00:00
|
|
|
image: git.halia.dev/athens-school/gitlab:15.5.0-amd64
|
2023-02-07 08:53:52 +00:00
|
|
|
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']
|
2022-10-16 22:35:03 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
volumeMounts:
|
2023-02-07 08:53:52 +00:00
|
|
|
- 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
|
2022-10-17 22:50:25 +00:00
|
|
|
- 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
|
2022-10-16 22:35:03 +00:00
|
|
|
volumes:
|
|
|
|
- name: gitlab-pv
|
|
|
|
hostPath:
|
2022-10-17 22:50:25 +00:00
|
|
|
path: "/mnt/gitlab/data"
|
2023-02-07 08:53:52 +00:00
|
|
|
- name: gitlab-config-secret
|
|
|
|
secret:
|
|
|
|
secretName: gitlab-config
|
|
|
|
- name: gitlab-secrets
|
|
|
|
secret:
|
|
|
|
secretName: gitlab-secrets
|
|
|
|
- name: gitlab-db-pv
|
|
|
|
hostPath:
|
|
|
|
path: "/mnt/gitlab/db"
|
2022-10-17 22:50:25 +00:00
|
|
|
- name: gitlab-backup
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: gitlab-backup-pvc
|