-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostgresql.yaml
More file actions
66 lines (66 loc) · 1.38 KB
/
Copy pathpostgresql.yaml
File metadata and controls
66 lines (66 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
apiVersion: v1
kind: Service
metadata:
name: gitlab-postgresql
labels:
app: gitlab
spec:
ports:
- port: 5432
selector:
app: gitlab
tier: postgresql
clusterIP: 10.0.0.33
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgresql-pv-claim
labels:
app: gitlab
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gitlab-postgresql
labels:
app: gitlab
spec:
strategy:
type: Recreate
template:
metadata:
labels:
app: gitlab
tier: postgresql
spec:
containers:
- image: sameersbn/postgresql:9.4-17
name: postgresql
env:
# $ kubectl create secret generic mysql-pass --from-file=password.txt
# make sure password.txt does not have a trailing newline
- name: DB_NAME
value: gitlabhq_production
- name: DB_USER
value: gitlab
- name: DB_PASS
value: password
- name: DB_EXTENSION
value: pg_trgm
ports:
- containerPort: 5432
name: postgresql
volumeMounts:
- name: postgresql-persistent-storage
mountPath: /var/lib/postgresql
volumes:
- name: postgresql-persistent-storage
persistentVolumeClaim:
claimName: postgresql-pv-claim