robocar-setup/ansible/roles/microservices/files/robocar/common/deployments.yaml

543 lines
15 KiB
YAML
Raw Normal View History

2022-01-02 16:33:18 +00:00
---
apiVersion: apps/v1
kind: Deployment
2024-03-09 15:01:32 +00:00
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:
2024-05-13 17:50:35 +00:00
- name: objects-detection
2024-03-09 15:01:32 +00:00
image: docker.io/cyrilix/robocar-objects-detection
args:
- "-mqtt-retain=false"
- "--image-width=$(IMAGE_WIDTH)"
- "--image-height=$(IMAGE_HEIGHT)"
2024-05-13 17:50:35 +00:00
- "--object-size-threshold=0.50"
- "--enable-big-objects-remove=true"
- "--enable-group-objects=false" # to debug/test
- "--enable-bottom-filter=false" # don't work
- "--enable-nearest-filter=true"
- "--object-bottom-limit=0.90"
- "--log=info"
2024-03-09 15:01:32 +00:00
securityContext:
runAsUser: 1234
runAsGroup: 1234
2024-05-13 17:50:35 +00:00
resources:
limits:
memory: 100Mi
2024-03-09 15:01:32 +00:00
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:
2024-05-13 17:50:35 +00:00
key: MQTT_TOPIC_CAMERA_DISPARITY
2024-03-09 15:01:32 +00:00
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
2022-01-02 16:33:18 +00:00
metadata:
name: steering
annotations:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: steering
template:
metadata:
labels:
component: steering
spec:
containers:
- name: steering
image: docker.io/cyrilix/robocar-steering
args:
- "-mqtt-retain=false"
2024-05-13 17:50:35 +00:00
- "--enable-objects-correction=$(DETECTION_OBJECTS)"
- "--enable-objects-correction-user=$(DETECTION_OBJECTS)"
2022-09-04 16:05:32 +00:00
- "--grid-map-config=/etc/robocar/grid.json"
- "--objects-move-factors-config=/etc/robocar/omf.json"
- "--delta-middle=0.1"
2022-01-28 17:05:36 +00:00
- "-log=info"
2022-01-02 16:33:18 +00:00
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-steering
- name: MQTT_TOPIC_STEERING
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_STEERING
name: robocar
- name: MQTT_TOPIC_TF_STEERING
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_TF_STEERING
name: robocar
- name: MQTT_TOPIC_RC_STEERING
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RC_STEERING
name: robocar
- name: MQTT_TOPIC_DRIVE_MODE
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RC_DRIVE_MODE
name: robocar
2022-09-04 16:05:32 +00:00
- name: MQTT_TOPIC_OBJECTS
valueFrom:
configMapKeyRef:
2024-05-13 17:50:35 +00:00
key: MQTT_TOPIC_OBJECTS_CLEAN
2022-09-04 16:05:32 +00:00
name: robocar
2022-01-02 16:33:18 +00:00
- name: MQTT_QOS
value: "0"
2022-09-04 16:05:32 +00:00
- name: IMAGE_WIDTH
valueFrom:
configMapKeyRef:
key: CAMERA_WIDTH
name: robocar-camera
- name: IMAGE_HEIGHT
valueFrom:
configMapKeyRef:
key: CAMERA_HEIGHT
name: robocar-camera
2022-01-02 16:33:18 +00:00
- name: TZ
value: "Europe/Paris"
2024-05-13 17:50:35 +00:00
- name: DETECTION_OBJECTS
valueFrom:
configMapKeyRef:
key: detection_objects
name: robocar-profiles
2022-09-04 16:05:32 +00:00
volumeMounts:
- mountPath: /etc/robocar
name: robocar-configs
volumes:
- name: robocar-configs
configMap:
name: steering
2022-01-02 16:33:18 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: throttle
annotations:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: throttle
template:
metadata:
labels:
component: throttle
spec:
containers:
- name: throttle
image: docker.io/cyrilix/robocar-throttle
args:
2022-10-07 12:43:05 +00:00
- "--mqtt-retain=false"
- "--enable-brake-feature=true"
- "--brake-configuration=/etc/robocar/brake.json"
2024-01-13 17:26:23 +00:00
- "--enable-custom-steering-processor=true"
2024-05-13 17:50:35 +00:00
- "--custom-steering-processor-config=/etc/robocar/$(THROTTLE_STEERING_CONFIG)"
2024-01-26 11:25:36 +00:00
- "--accelerator-factor=$(THROTTLE_ACCELERATOR_FACTOR)"
2022-10-07 12:43:05 +00:00
- "--log=info"
2022-01-02 16:33:18 +00:00
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-throttle
- name: MQTT_TOPIC_THROTTLE
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_THROTTLE
name: robocar
- name: MQTT_TOPIC_RC_THROTTLE
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RC_THROTTLE
name: robocar
- name: MQTT_TOPIC_DRIVE_MODE
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RC_DRIVE_MODE
name: robocar
2022-10-07 12:43:05 +00:00
- name: MQTT_TOPIC_THROTTLE_FEEDBACK
valueFrom:
configMapKeyRef:
name: robocar
key: MQTT_TOPIC_THROTTLE_FEEDBACK
- name: MQTT_TOPIC_STEERING
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_STEERING
name: robocar
2024-01-13 17:26:23 +00:00
- name: MQTT_TOPIC_SPEED_ZONE
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_SPEED_ZONE
name: robocar
- name: MQTT_TOPIC_MAX_THROTTLE_CTRL
valueFrom:
configMapKeyRef:
name: robocar
key: MQTT_TOPIC_MAX_THROTTLE_CTRL
2022-01-02 16:33:18 +00:00
- name: THROTTLE_MIN
valueFrom:
configMapKeyRef:
key: THROTTLE_MIN
name: robocar-throttle
- name: THROTTLE_MAX
valueFrom:
configMapKeyRef:
key: THROTTLE_MAX
name: robocar-throttle
2024-01-26 11:25:36 +00:00
- name: THROTTLE_ACCELERATOR_FACTOR
valueFrom:
configMapKeyRef:
name: robocar-throttle
key: THROTTLE_ACCELERATOR_FACTOR
2024-05-13 17:50:35 +00:00
- name: THROTTLE_STEERING_CONFIG
valueFrom:
configMapKeyRef:
key: throttle_from_steering
name: robocar-profiles
2022-01-02 16:33:18 +00:00
- name: MQTT_QOS
value: "0"
- name: TZ
value: "Europe/Paris"
2022-10-07 12:43:05 +00:00
volumeMounts:
- mountPath: /etc/robocar
name: throttle-config
volumes:
- name: throttle-config
configMap:
name: throttle
2022-01-02 16:33:18 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: recorder
annotations:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: recorder
template:
metadata:
labels:
component: recorder
spec:
containers:
- name: recorder
image: docker.io/cyrilix/robocar-recorder-store
args:
- "-mqtt-retain=true"
- "-record-path=/records"
- "-log=info"
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-recorder
- name: MQTT_TOPIC_RECORDS
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RECORDS
name: robocar
- name: MQTT_QOS
value: "0"
- name: TZ
value: "Europe/Paris"
volumeMounts:
- mountPath: /records
name: records
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
volumes:
- name: records
hostPath:
path: /home/pi/records
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: record
annotations:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: record
template:
metadata:
labels:
component: record
spec:
containers:
- name: record
image: docker.io/cyrilix/robocar-record
args:
- "-mqtt-retain=true"
2022-06-10 14:09:47 +00:00
- "-debug=false"
2022-01-02 16:33:18 +00:00
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-record
- name: MQTT_TOPIC_CAMERA
valueFrom:
configMapKeyRef:
2022-05-19 13:04:10 +00:00
key: MQTT_TOPIC_CAMERA_OAK_COLOR
2022-01-02 16:33:18 +00:00
name: robocar
- name: MQTT_TOPIC_STEERING
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RC_STEERING
name: robocar
- name: MQTT_TOPIC_SWITCH_RECORD
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RC_SWITCH_RECORD
name: robocar
2024-01-13 17:26:23 +00:00
- name: MQTT_TOPIC_AUTOPILOT_STEERING
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_TF_STEERING
name: robocar
- name: MQTT_TOPIC_DRIVE_MODE
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RC_DRIVE_MODE
name: robocar
2022-01-02 16:33:18 +00:00
- name: MQTT_TOPIC_RECORDS
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_RECORDS
name: robocar
- name: MQTT_QOS
value: "0"
- name: TZ
value: "Europe/Paris"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: road
annotations:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
2022-06-10 14:09:30 +00:00
replicas: 0
2022-01-02 16:33:18 +00:00
strategy:
type: Recreate
selector:
matchLabels:
component: road
template:
metadata:
labels:
component: road
spec:
containers:
- name: road
image: docker.io/cyrilix/robocar-road
args:
- "-mqtt-retain=false"
2024-05-13 17:50:35 +00:00
- "-image-width=$(IMAGE_WIDTH)"
- "-image-height=$(IMAGE_HEIGHT)"
- "-white-threshold-low=20"
- "-white-threshold-high=255"
- "-canny-threshold-low=100"
- "-canny-threshold-high=250"
- "-hough-lines-rho=2" # distance resolution in pixels of the Hough grid")
#- "-hough-lines-theta", 1*math.Pi/180, "angular resolution in radians of the Hough grid, default Pi/180")
- "-hough-lines-threshold=15" # minimum number of votes (intersections in Hough grid cell)
- "-hough-lines-min-line-length=10" # minimum number of pixels making up a line
- "-hough-lines-max-lines-gap=20" # maximum gap in pixels between connectable line segments
2022-01-02 16:33:18 +00:00
- "--log=info"
securityContext:
runAsUser: 1234
runAsGroup: 1234
2024-05-13 17:50:35 +00:00
resources:
limits:
memory: 100Mi
cpu: 500m
2022-01-02 16:33:18 +00:00
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-road
- name: MQTT_TOPIC_CAMERA
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_CAMERA
name: robocar
- name: MQTT_TOPIC_ROAD
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_ROAD
name: robocar
- name: MQTT_QOS
value: "0"
2024-05-13 17:50:35 +00:00
- name: IMAGE_WIDTH
valueFrom:
configMapKeyRef:
key: CAMERA_WIDTH
name: robocar-camera
- name: IMAGE_HEIGHT
valueFrom:
configMapKeyRef:
key: CAMERA_HEIGHT
name: robocar-camera
2022-01-02 16:33:18 +00:00
- name: TZ
value: "Europe/Paris"