60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
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
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- mountPath: "/etc/gitlab/gitlab.rb"
|
|
name: gitlab-config-volume
|
|
subPath: gitlab.rb
|
|
- 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-db-pv
|
|
hostPath:
|
|
path: "/mnt/gitlab/db"
|
|
- name: gitlab-pv
|
|
hostPath:
|
|
path: "/mnt/gitlab/data"
|
|
- name: gitlab-config-volume
|
|
configMap:
|
|
name: gitlab-config
|
|
- name: gitlab-backup
|
|
persistentVolumeClaim:
|
|
claimName: gitlab-backup-pvc
|