-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreasonml-postgres-deployment.yaml
69 lines (69 loc) · 1.67 KB
/
reasonml-postgres-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
apiVersion: apps/v1
kind: Deployment
metadata:
name: reasonml-postgres-deployment
spec:
selector:
matchLabels:
purpose: reasonml-postgres-config
replicas: 1
template:
metadata:
labels:
purpose: reasonml-postgres-config
spec:
containers:
- name: reasonml-postgres-container
image: gcr.io/radiant-destiny-219301/reasonml-postgres:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
- name: liveness-port
containerPort: 8080
hostPort: 80
livenessProbe:
httpGet:
path: /healthz
port: liveness-port
httpHeaders:
- name: Accept
value: text/html
resources:
limits:
memory: "50Mi"
cpu: "100m"
env:
- name: DB_CONNECTION
valueFrom:
secretKeyRef:
name: postgres
key: db-connection
---
apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
name: reasonml-postgres-backendconfig
spec:
timeoutSec: 86400
connectionDraining:
drainingTimeoutSec: 3600
sessionAffinity:
affinityType: "CLIENT_IP"
---
apiVersion: v1
kind: Service
metadata:
name: reasonml-postgres-service
labels:
purpose: reasonml-postgres-config
annotations:
cloud.google.com/neg: '{"ingress": true}'
beta.cloud.google.com/backend-config: '{"ports": {"80":"reasonml-postgres-backendconfig"}}'
spec:
type: NodePort
selector:
purpose: reasonml-postgres-config
ports:
- port: 80
protocol: TCP
targetPort: 8080