diff --git a/ansible/roles/microservices/files/robocar/common/configmap.yaml b/ansible/roles/microservices/files/robocar/common/configmap.yaml index 9137f26..a6a2284 100644 --- a/ansible/roles/microservices/files/robocar/common/configmap.yaml +++ b/ansible/roles/microservices/files/robocar/common/configmap.yaml @@ -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 diff --git a/ansible/roles/microservices/files/robocar/common/deployments.yaml b/ansible/roles/microservices/files/robocar/common/deployments.yaml index 8761bfa..cdf079e 100644 --- a/ansible/roles/microservices/files/robocar/common/deployments.yaml +++ b/ansible/roles/microservices/files/robocar/common/deployments.yaml @@ -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: diff --git a/ansible/roles/microservices/files/robocar/common/kustomization.yaml b/ansible/roles/microservices/files/robocar/common/kustomization.yaml index 2f9866c..475dc0e 100644 --- a/ansible/roles/microservices/files/robocar/common/kustomization.yaml +++ b/ansible/roles/microservices/files/robocar/common/kustomization.yaml @@ -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