annotate deploy.yaml @ 2:f822e7fe7120

rewrite to use telemetrix (localized)
author drewp@bigasterisk.com
date Sun, 05 Feb 2023 14:06:19 -0800
parents 125c794511a6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
drewp@bigasterisk.com
parents:
diff changeset
1 apiVersion: apps/v1
drewp@bigasterisk.com
parents:
diff changeset
2 kind: Deployment
drewp@bigasterisk.com
parents:
diff changeset
3 metadata:
drewp@bigasterisk.com
parents:
diff changeset
4 name: doorbell
drewp@bigasterisk.com
parents:
diff changeset
5 spec:
drewp@bigasterisk.com
parents:
diff changeset
6 replicas: 1
drewp@bigasterisk.com
parents:
diff changeset
7 strategy: { type: Recreate }
drewp@bigasterisk.com
parents:
diff changeset
8 selector: { matchLabels: { app: doorbell } }
drewp@bigasterisk.com
parents:
diff changeset
9 template:
drewp@bigasterisk.com
parents:
diff changeset
10 metadata:
drewp@bigasterisk.com
parents:
diff changeset
11 labels: { app: doorbell }
drewp@bigasterisk.com
parents:
diff changeset
12 annotations: { prometheus.io/scrape: "false" }
drewp@bigasterisk.com
parents:
diff changeset
13 spec:
drewp@bigasterisk.com
parents:
diff changeset
14 containers:
drewp@bigasterisk.com
parents:
diff changeset
15 - name: doorbell
drewp@bigasterisk.com
parents:
diff changeset
16 image: bang5:5000/doorbell_image
drewp@bigasterisk.com
parents:
diff changeset
17 args:
drewp@bigasterisk.com
parents:
diff changeset
18 - pdm
drewp@bigasterisk.com
parents:
diff changeset
19 - run
drewp@bigasterisk.com
parents:
diff changeset
20 - python
drewp@bigasterisk.com
parents:
diff changeset
21 - doorbell_to_mqtt.py
drewp@bigasterisk.com
parents:
diff changeset
22 - /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900cepU-if00-port0
drewp@bigasterisk.com
parents:
diff changeset
23 securityContext: { privileged: true }
drewp@bigasterisk.com
parents:
diff changeset
24
drewp@bigasterisk.com
parents:
diff changeset
25 volumeMounts:
drewp@bigasterisk.com
parents:
diff changeset
26 - { name: dev, mountPath: /dev }
drewp@bigasterisk.com
parents:
diff changeset
27 volumes:
drewp@bigasterisk.com
parents:
diff changeset
28 - { name: dev, hostPath: { path: /dev, type: Directory } }
drewp@bigasterisk.com
parents:
diff changeset
29
drewp@bigasterisk.com
parents:
diff changeset
30 affinity:
drewp@bigasterisk.com
parents:
diff changeset
31 nodeAffinity:
drewp@bigasterisk.com
parents:
diff changeset
32 requiredDuringSchedulingIgnoredDuringExecution:
drewp@bigasterisk.com
parents:
diff changeset
33 { nodeSelectorTerms: [{ matchExpressions: [{ key: "kubernetes.io/hostname", operator: In, values: ["bang"] }] }] }
1
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
34
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
35 ---
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
36 apiVersion: v1
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
37 kind: Service
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
38 metadata:
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
39 name: doorbell
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
40 spec:
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
41 ports:
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
42 - {port: 80, targetPort: 8000}
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
43 selector:
125c794511a6 deployment config
drewp@bigasterisk.com
parents: 0
diff changeset
44 app: doorbell