forked from sourcegraph/deploy-sourcegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pgsql.Deployment.yaml
78 lines (78 loc) · 1.92 KB
/
pgsql.Deployment.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: Postgres database for various data.
labels:
deploy: sourcegraph
name: pgsql
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: pgsql
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: pgsql
group: backend
spec:
containers:
- env:
image: index.docker.io/sourcegraph/postgres-11.4:19-11-14_b084311b@sha256:072481559d559cfd9a53ad77c3688b5cf583117457fd452ae238a20405923297
terminationMessagePolicy: FallbackToLogsOnError
readinessProbe:
exec:
command:
- /ready.sh
livenessProbe:
initialDelaySeconds: 15
exec:
command:
- /liveness.sh
name: pgsql
ports:
- containerPort: 5432
name: pgsql
resources:
limits:
cpu: "4"
memory: 2Gi
requests:
cpu: "4"
memory: 2Gi
volumeMounts:
- mountPath: /data
name: disk
- mountPath: /conf
name: pgsql-conf
- env:
- name: DATA_SOURCE_NAME
value: postgres://sg:@localhost:5432/?sslmode=disable
image: wrouesnel/postgres_exporter:v0.5.1@sha256:b9bad0d21bcb73b347ab75add47fd024d5ff82718b9369457591243dff26cc09
terminationMessagePolicy: FallbackToLogsOnError
name: pgsql-exporter
resources:
limits:
cpu: 10m
memory: 50Mi
requests:
cpu: 10m
memory: 50Mi
securityContext:
runAsUser: 0
volumes:
- name: disk
persistentVolumeClaim:
claimName: pgsql
- name: pgsql-conf
configMap:
defaultMode: 0777
name: pgsql-conf