k8s: deploy objects-detection pod

This commit is contained in:
Cyrille Nofficial 2024-03-09 16:01:32 +01:00
parent 3c6aab0145
commit affd0568cb
3 changed files with 84 additions and 1 deletions

View File

@ -14,7 +14,8 @@ data:
MQTT_TOPIC_CAMERA_DISPARITY: "car/satanas/part/camera/disparity"
# Objects detection
MQTT_TOPIC_OBJECTS: car/satanas/part/objects
MQTT_TOPIC_OBJECTS: "car/satanas/part/objects/raw"
MQTT_TOPIC_OBJECTS_CLEAN: "car/satanas/part/objects/clean"
# Radio command
MQTT_TOPIC_RC_THROTTLE: car/satanas/part/rc/throttle

View File

@ -1,6 +1,85 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: objects-detection
annotations:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: objects-detection
template:
metadata:
labels:
component: objects-detection
spec:
containers:
- name: steering
image: docker.io/cyrilix/robocar-objects-detection
args:
- "-mqtt-retain=false"
- "--image-width=$(IMAGE_WIDTH)"
- "--image-height=$(IMAGE_HEIGHT)"
- "--object-size-threshold=0.75"
- "-log=info"
securityContext:
runAsUser: 1234
runAsGroup: 1234
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-objects-detection
- name: MQTT_TOPIC_OBJECTS
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_OBJECTS
name: robocar
- name: MQTT_TOPIC_OBJECTS_CLEAN
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_OBJECTS_CLEAN
name: robocar
- name: MQTT_TOPIC_DISPARITY
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_DISPARITY
name: robocar
- name: MQTT_QOS
value: "0"
- name: IMAGE_WIDTH
valueFrom:
configMapKeyRef:
key: CAMERA_WIDTH
name: robocar-camera
- name: IMAGE_HEIGHT
valueFrom:
configMapKeyRef:
key: CAMERA_HEIGHT
name: robocar-camera
- name: TZ
value: "Europe/Paris"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: steering
annotations:

View File

@ -24,3 +24,6 @@ images:
- name: docker.io/cyrilix/robocar-road
newTag: v0.2.0
- name: docker.io/cyrilix/robocar-objects-detection
newTag: v0.1.0