-
Notifications
You must be signed in to change notification settings - Fork 6
/
sentry-pgdb.yml
80 lines (79 loc) · 1.82 KB
/
sentry-pgdb.yml
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
79
80
apiVersion: v1
kind: Service
metadata:
name: sentry-postgresql
# namespace: local
spec:
type: ClusterIP
ports:
- name: postgresql-port
port: 5432
targetPort: postgresql-port
selector:
app: sentry-postgresql
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: sentry-postgresql
name: sentry-postgresql
# namespace: local
spec:
replicas: 1
template:
metadata:
labels:
app: sentry-postgresql
spec:
containers:
- name: sentry-postgresql
image: "postgres:9.6"
imagePullPolicy: IfNotPresent
env:
- name: POSTGRES_USER
value: "sentry"
- name: PGUSER
value: "sentry"
- name: POSTGRES_DB
value: "sentry"
- name: POSTGRES_INITDB_ARGS
value: ""
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
- name: POSTGRES_PASSWORD
value: "ymzndl33SNwdm"
- name: POD_IP
valueFrom: { fieldRef: { fieldPath: status.podIP } }
ports:
- name: postgresql-port
containerPort: 5432
livenessProbe:
exec:
command:
- sh
- -c
- exec pg_isready --host $POD_IP
initialDelaySeconds: 60
timeoutSeconds: 5
failureThreshold: 6
readinessProbe:
exec:
command:
- sh
- -c
- exec pg_isready --host $POD_IP
initialDelaySeconds: 5
timeoutSeconds: 3
periodSeconds: 5
resources:
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- name: storage
mountPath: /var/lib/postgresql/data/pgdata
subPath: postgresql-db
volumes:
- name: storage
emptyDir: {}