You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.2 KiB
61 lines
1.2 KiB
2 years ago
|
kind: Service
|
||
|
apiVersion: v1
|
||
|
metadata:
|
||
|
name: gitlab-db
|
||
|
spec:
|
||
|
selector:
|
||
|
pod: gitlab-db
|
||
|
ports:
|
||
|
- protocol: TCP
|
||
|
port: 5432
|
||
|
targetPort: 5432
|
||
|
---
|
||
|
kind: PersistentVolumeClaim
|
||
|
apiVersion: v1
|
||
|
metadata:
|
||
|
name: gitlab-db-pvc
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 10Gi
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: gitlab-db
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
pod: gitlab-db
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
pod: gitlab-db
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: gitlab-db
|
||
|
image: postgres:alpine
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
env:
|
||
|
- name: POSTGRES_USER
|
||
|
value: gitlab
|
||
|
- name: POSTGRES_DB
|
||
|
value: gitlabhq_production
|
||
|
- name: POSTGRES_PASSWORD
|
||
|
value: gitlab
|
||
|
|
||
|
ports:
|
||
|
- containerPort: 5432
|
||
|
volumeMounts:
|
||
|
- name: gitlab-db-volume
|
||
|
mountPath: /var/lib/postgresql/data
|
||
|
subPath: gitlab
|
||
|
|
||
|
volumes:
|
||
|
- name: gitlab-db-volume
|
||
|
persistentVolumeClaim:
|
||
|
claimName: gitlab-db-pvc
|