-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathbackend.yaml
More file actions
108 lines (108 loc) · 2.99 KB
/
Copy pathbackend.yaml
File metadata and controls
108 lines (108 loc) · 2.99 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
apiVersion: v1
kind: Service
metadata:
name: backend
spec:
ports:
- port: 4000
targetPort: 4000
name: http
selector:
app: backend
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
spec:
replicas: 1
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
annotations:
ad.datadoghq.com/backend.logs: '[{"source": "ruby", "auto_multi_line_detection":true}]'
spec:
volumes:
- name: apmsocketpath
hostPath:
path: /var/run/datadog/
initContainers:
- name: wait-for-db
image: busybox
command: ['sh', '-c', 'until nc -z postgres 5432; do echo waiting for postgres; sleep 2; done;']
containers:
- name: backend
image: ${REGISTRY_URL}/backend:${SD_TAG}
ports:
- containerPort: 4000
env:
- name: REDIS_URL
valueFrom:
configMapKeyRef:
name: storedog-config
key: REDIS_URL
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: storedog-config
key: DB_HOST
- name: DB_PORT
valueFrom:
configMapKeyRef:
name: storedog-config
key: DB_PORT
- name: POSTGRES_USER
valueFrom:
configMapKeyRef:
name: storedog-config
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: storedog-secrets
key: POSTGRES_PASSWORD
- name: RAILS_ENV
valueFrom:
configMapKeyRef:
name: storedog-config
key: RAILS_ENV
- name: DB_POOL
valueFrom:
configMapKeyRef:
name: storedog-config
key: DB_POOL
- name: MAX_THREADS
valueFrom:
configMapKeyRef:
name: storedog-config
key: MAX_THREADS
- name: DD_ENV
value: ${DD_ENV}
- name: DD_SERVICE
value: store-backend
- name: DD_VERSION
value: ${DD_VERSION_BACKEND}
- name: DD_LOGS_INJECTION
value: "true"
- name: DD_RUNTIME_METRICS_ENABLED
value: "true"
- name: DD_PROFILING_ENABLED
value: "true"
- name: DD_PROFILING_ALLOCATION_ENABLED
value: "true"
- name: DD_PROFILING_TIMELINE_ENABLED
value: "true"
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "1Gi"
cpu: "500m"
volumeMounts:
- name: apmsocketpath
mountPath: /var/run/datadog