-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubernetes.yaml
93 lines (93 loc) · 2.2 KB
/
kubernetes.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: aki-detection-state
namespace: peace
spec:
accessModes:
- ReadWriteOnce
storageClassName: managed-csi
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: aki-detection
namespace: peace
spec:
replicas: 1
selector:
matchLabels:
app: aki-detection
template:
metadata:
labels:
app: aki-detection
annotations:
prometheus.io/scrape: 'true'
prometheus.io/path: '/metrics'
prometheus.io/port: '8000'
spec:
containers:
- name: aki-detection
image: imperialswemlsspring2024.azurecr.io/coursework6-peace
command: ["/app/main.py"]
args:
- "--history=/hospital-history/history.csv"
env:
- name: HISTORY_PATH
value: /hospital-history/history.csv
- name: MLLP_ADDRESS
value: peace-simulator.coursework6:8440
- name: PAGER_ADDRESS
value: peace-simulator.coursework6:8441
- name: PYTHONUNBUFFERED
value: "1"
volumeMounts:
- mountPath: "/hospital-history"
name: hospital-history
readOnly: true
- mountPath: "/state"
name: aki-detection-state
resources:
requests:
memory: 1Gi
cpu: 1
ports:
- containerPort: 8000
name: metrics
initContainers:
- name: copy-hospital-history
image: imperialswemlsspring2024.azurecr.io/coursework6-history
volumeMounts:
- mountPath: "/hospital-history"
name: hospital-history
- mountPath: "/state"
name: aki-detection-state
resources:
requests:
memory: 1Gi
cpu: 1
volumes:
- name: hospital-history
emptyDir:
sizeLimit: 50Mi
- name: aki-detection-state
persistentVolumeClaim:
claimName: aki-detection-state
---
apiVersion: v1
kind: Service
metadata:
name: aki-detection-metrics
namespace: peace
spec:
selector:
app: aki-detection
ports:
- name: metrics
protocol: TCP
port: 8000
targetPort: metrics