K3s-cluster/gitlab/deployment.yaml

60 lines
1.9 KiB
YAML
Raw Normal View History

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: gitlab/gitlab-ce:15.4.2-ce.0
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