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
|
|
|
|
image: gitlab/gitlab-ce:15.4.2-ce.0
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: "/etc/gitlab/gitlab.rb"
|
|
|
|
name: gitlab-config-volume
|
|
|
|
subPath: gitlab.rb
|
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:
|
2022-10-17 22:50:25 +00:00
|
|
|
- name: gitlab-db-pv
|
|
|
|
hostPath:
|
|
|
|
path: "/mnt/gitlab/db"
|
2022-10-16 22:35:03 +00:00
|
|
|
- name: gitlab-pv
|
|
|
|
hostPath:
|
2022-10-17 22:50:25 +00:00
|
|
|
path: "/mnt/gitlab/data"
|
2022-10-16 22:35:03 +00:00
|
|
|
- name: gitlab-config-volume
|
|
|
|
configMap:
|
|
|
|
name: gitlab-config
|
2022-10-17 22:50:25 +00:00
|
|
|
- name: gitlab-backup
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: gitlab-backup-pvc
|