-
Notifications
You must be signed in to change notification settings - Fork 0
/
Concourse.PostgreSQL.StatefulSet.yaml
58 lines (58 loc) · 1.37 KB
/
Concourse.PostgreSQL.StatefulSet.yaml
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
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: concourse-postgres
labels:
concourse: db
app: concourse
spec:
replicas: 1
serviceName: concourse-postgres
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
template:
metadata:
name: concourse-postgres
labels:
concourse: db
app: concourse
spec:
terminationGracePeriodSeconds: 10
containers:
- name: concourse-postgres
image: postgres:9.6
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: concourse
key: postgres_user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: concourse
key: postgres_password
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
resources:
requests:
memory: 400M
cpu: 0.4
limits:
memory: 1G
cpu: 2
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: data
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
storageClassName: ssd-normal
resources:
requests:
storage: 8Gi
---