annotate deploy.yaml @ 3:0cc41259fddd

healthcheck
author drewp@bigasterisk.com
date Sun, 10 Dec 2023 17:26:52 -0800
parents 3989f073ed9e
children 759f0ba7d345
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
1 apiVersion: apps/v1
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
2 kind: Deployment
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
3 metadata:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
4 name: pi-mqtt
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
5 spec:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
6 replicas: 1
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
7 selector:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
8 matchLabels:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
9 app: pi-mqtt
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
10 template:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
11 metadata:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
12 labels:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
13 app: pi-mqtt
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
14 spec:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
15
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
16 volumes:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
17 - name: nginx-conf
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
18 configMap:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
19 name: pi-mqtt-nginx-conf
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
20 containers:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
21 - name: proxy
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
22 image: docker.io/nginx:1.21.6
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
23 ports:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
24 - containerPort: 80
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
25 volumeMounts:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
26 - { name: nginx-conf, mountPath: "/etc/nginx/" }
3
0cc41259fddd healthcheck
drewp@bigasterisk.com
parents: 0
diff changeset
27 livenessProbe:
0cc41259fddd healthcheck
drewp@bigasterisk.com
parents: 0
diff changeset
28 httpGet:
0cc41259fddd healthcheck
drewp@bigasterisk.com
parents: 0
diff changeset
29 path: /health
0cc41259fddd healthcheck
drewp@bigasterisk.com
parents: 0
diff changeset
30 port: 80
0
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
31 - name: pi-mqtt-vite
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
32 image: reg:5000/pi_mqtt_image
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
33 ports:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
34 - containerPort: 8002
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
35 command:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
36 - pnpm
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
37 - exec
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
38 - vite
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
39 - --port=8002
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
40 - name: pi-mqtt-py
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
41 image: reg:5000/pi_mqtt_image
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
42 ports:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
43 - containerPort: 8001
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
44 command:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
45 - pdm
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
46 - run
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
47 - uvicorn
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
48 - '--port=8001'
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
49 - '--host=0.0.0.0'
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
50 - '--reload'
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
51 - 'pi_mqtt:app'
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
52 ---
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
53 apiVersion: v1
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
54 kind: Service
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
55 metadata:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
56 name: pi-mqtt
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
57 spec:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
58 ports:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
59 - {port: 80, targetPort: 80}
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
60 selector:
3989f073ed9e start. hardcoded motion light in garage
drewp@bigasterisk.com
parents:
diff changeset
61 app: pi-mqtt