-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathapp_deployment.yaml
43 lines (43 loc) · 1.23 KB
/
app_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
apiVersion: apps/v1
kind: Deployment
metadata:
name: flaskapp
spec:
replicas: 1
selector:
matchLabels:
app: flaskapp
template:
metadata:
labels:
app: flaskapp
annotations:
ad.datadoghq.com/flaskapp.check_names: '["prometheus"]'
ad.datadoghq.com/flaskapp.init_configs: '[{}]'
ad.datadoghq.com/flaskapp.instances: '[{"prometheus_url":"%%host%%/metrics","metrics":["*"],"namespace":"apple"}]'
# 6.5 ad.datadoghq.com/flaskapp.logs: '[{"type":"file","path":"/var/log/mylog.json","service":"flask","source":"python","sourcecategory":"sourcecode"}]'
spec:
containers:
- name: flaskapp
image: sample_flask:007
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
env:
- name: DD_AGENT_SERVICE_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: DD_AGENT_SERVICE_PORT
value: '8126'
- name: DD_AGENT_STATSD_PORT
value: '8125'
- name: POSTGRES_PORT
value: '5432'
volumeMounts:
- name: flasklogs
mountPath: /var/log
volumes:
- hostPath:
path: /var/log
name: flasklogs