174 lines
4.9 KiB
YAML
174 lines
4.9 KiB
YAML
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: camera-replay
|
||
|
annotations:
|
||
|
reloader.stakater.com/auto: "true"
|
||
|
spec:
|
||
|
revisionHistoryLimit: 0
|
||
|
replicas: 1
|
||
|
strategy:
|
||
|
type: Recreate
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
component: camera-replay
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
component: camera-replay
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: camera-replay
|
||
|
image: docker.io/cyrilix/robocar-camera-replay
|
||
|
args:
|
||
|
- "-mqtt-pub-frequency=$(MQTT_CAMERA_PUB_FREQUENCY)"
|
||
|
- "-frame-dir=$(REPLAY_FRAME_DIR)"
|
||
|
- "-log=info"
|
||
|
securityContext:
|
||
|
runAsUser: 1000
|
||
|
runAsGroup: 1000
|
||
|
privileged: false
|
||
|
volumeMounts:
|
||
|
- name: camera-records
|
||
|
mountPath: /records
|
||
|
env:
|
||
|
- name: MQTT_BROKER
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: MQTT_BROKER
|
||
|
name: robocar
|
||
|
- name: MQTT_USERNAME
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
key: MQTT_USERNAME
|
||
|
name: mqtt-credentials
|
||
|
- name: MQTT_PASSWORD
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
key: MQTT_PASSWORD
|
||
|
name: mqtt-credentials
|
||
|
- name: MQTT_CLIENT_ID
|
||
|
value: rc-camera-replay
|
||
|
- name: MQTT_TOPIC
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: MQTT_TOPIC_CAMERA
|
||
|
name: robocar
|
||
|
- name: REPLAY_FRAME_DIR
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: REPLAY_FRAME_DIR
|
||
|
name: robocar-camera-replay
|
||
|
- name: MQTT_CAMERA_PUB_FREQUENCY
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: MQTT_CAMERA_PUB_FREQUENCY
|
||
|
name: robocar-camera
|
||
|
- name: MQTT_QOS
|
||
|
value: "0"
|
||
|
- name: TZ
|
||
|
value: "Europe/Paris"
|
||
|
volumes:
|
||
|
- name: camera-records
|
||
|
hostPath:
|
||
|
path: "/home/cyrille/robocar-clean/"
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: tflite-steering
|
||
|
annotations:
|
||
|
reloader.stakater.com/auto: "true"
|
||
|
spec:
|
||
|
revisionHistoryLimit: 0
|
||
|
replicas: 1
|
||
|
strategy:
|
||
|
type: Recreate
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
component: tflite-steering
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
component: tflite-steering
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: tflite-steering
|
||
|
image: docker.io/cyrilix/robocar-steering-tflite-edgetpu
|
||
|
args:
|
||
|
#- "--model=/model/$(MODEL_STEERING)"
|
||
|
- "--oci-model-registry=$(OCI_IMAGE_MODEL_REGISTRY)"
|
||
|
- "--oci-model-repository=$(OCI_IMAGE_MODEL_REPOSITORY)"
|
||
|
- "--oci-model-tag=$(OCI_IMAGE_MODEL_TAG)"
|
||
|
- "--edge-verbosity=0"
|
||
|
- "--log=info"
|
||
|
securityContext:
|
||
|
runAsUser: 0
|
||
|
runAsGroup: 0
|
||
|
privileged: true
|
||
|
volumeMounts:
|
||
|
- name: models
|
||
|
mountPath: /model
|
||
|
- name: bus-usb
|
||
|
mountPath: /dev/bus/usb
|
||
|
- name: sys
|
||
|
mountPath: /sys
|
||
|
env:
|
||
|
- name: MQTT_BROKER
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: MQTT_BROKER
|
||
|
name: robocar
|
||
|
- name: MQTT_USERNAME
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
key: MQTT_USERNAME
|
||
|
name: mqtt-credentials
|
||
|
- name: MQTT_PASSWORD
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
key: MQTT_PASSWORD
|
||
|
name: mqtt-credentials
|
||
|
- name: MQTT_CLIENT_ID
|
||
|
value: rc-tflite-steering
|
||
|
- name: MQTT_TOPIC_CAMERA
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: MQTT_TOPIC_CAMERA_OAK_COLOR
|
||
|
name: robocar
|
||
|
- name: MQTT_TOPIC_STEERING
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: MQTT_TOPIC_TF_STEERING
|
||
|
name: robocar
|
||
|
- name: OCI_IMAGE_MODEL_REGISTRY
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: OCI_IMAGE_MODEL_REGISTRY
|
||
|
name: robocar-models
|
||
|
- name: OCI_IMAGE_MODEL_REPOSITORY
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
key: OCI_IMAGE_MODEL_REPOSITORY
|
||
|
name: robocar-models
|
||
|
- name: OCI_IMAGE_MODEL_TAG
|
||
|
value: "v20230603.1157-tflite"
|
||
|
- name: MQTT_QOS
|
||
|
value: "0"
|
||
|
- name: LD_LIBRARY_PATH
|
||
|
value: "/usr/local/lib/:/usr/lib"
|
||
|
- name: TZ
|
||
|
value: "Europe/Paris"
|
||
|
volumes:
|
||
|
- name: models
|
||
|
hostPath:
|
||
|
path: /home/pi/models/steering
|
||
|
type: DirectoryOrCreate
|
||
|
- name: bus-usb
|
||
|
hostPath:
|
||
|
path: /dev/bus/usb
|
||
|
- name: sys
|
||
|
hostPath:
|
||
|
path: /sys
|