2022-01-02 16:33:18 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: camera
|
|
|
|
annotations:
|
|
|
|
reloader.stakater.com/auto: "true"
|
|
|
|
spec:
|
|
|
|
revisionHistoryLimit: 0
|
2022-01-28 17:07:36 +00:00
|
|
|
replicas: 0
|
2022-01-02 16:33:18 +00:00
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
component: camera
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
component: camera
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: camera
|
|
|
|
image: docker.io/cyrilix/robocar-camera
|
|
|
|
args:
|
|
|
|
- "-mqtt-pub-frequency=$(MQTT_CAMERA_PUB_FREQUENCY)"
|
|
|
|
- "-video-device=0"
|
|
|
|
- "-video-width=$(CAMERA_WIDTH)"
|
|
|
|
- "-video-height=$(CAMERA_HEIGHT)"
|
2022-01-28 17:05:36 +00:00
|
|
|
- "-log=info"
|
2022-01-02 16:33:18 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 1234
|
|
|
|
runAsGroup: 44 # Set 44/video group to access to video device
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- name: camera-device
|
|
|
|
mountPath: /dev/video0
|
|
|
|
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
|
|
|
|
- name: MQTT_TOPIC
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MQTT_TOPIC_CAMERA
|
|
|
|
name: robocar
|
|
|
|
- name: CAMERA_WIDTH
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: CAMERA_WIDTH
|
|
|
|
name: robocar-camera
|
|
|
|
- name: CAMERA_HEIGHT
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: CAMERA_HEIGHT
|
|
|
|
name: robocar-camera
|
|
|
|
- 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-device
|
|
|
|
hostPath:
|
|
|
|
path: "/dev/video0"
|
|
|
|
type: CharDevice
|
2022-01-28 17:07:36 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: oak-camera
|
|
|
|
annotations:
|
|
|
|
reloader.stakater.com/auto: "true"
|
|
|
|
spec:
|
|
|
|
revisionHistoryLimit: 0
|
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
component: oak-camera
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
component: oak-camera
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: camera
|
|
|
|
image: docker.io/cyrilix/robocar-oak-camera
|
|
|
|
args:
|
|
|
|
- "--image-width=$(CAMERA_WIDTH)"
|
|
|
|
- "--image-height=$(CAMERA_HEIGHT)"
|
|
|
|
securityContext:
|
2022-01-28 17:36:54 +00:00
|
|
|
runAsUser: 1234
|
2022-01-28 17:07:36 +00:00
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- name: sys
|
|
|
|
mountPath: /sys
|
|
|
|
- name: dev
|
|
|
|
mountPath: /dev
|
|
|
|
env:
|
|
|
|
- name: MQTT_BROKER
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MQTT_BROKER_HOST
|
|
|
|
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-oak-camera
|
|
|
|
- name: MQTT_TOPIC_CAMERA
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MQTT_TOPIC_CAMERA_OAK_COLOR
|
|
|
|
name: robocar
|
|
|
|
- name: CAMERA_WIDTH
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: CAMERA_WIDTH
|
|
|
|
name: robocar-camera
|
|
|
|
- name: CAMERA_HEIGHT
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: CAMERA_HEIGHT
|
|
|
|
name: robocar-camera
|
|
|
|
- name: MQTT_QOS
|
|
|
|
value: "0"
|
|
|
|
- name: TZ
|
|
|
|
value: "Europe/Paris"
|
|
|
|
hostNetwork: true
|
|
|
|
volumes:
|
|
|
|
- name: sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: dev
|
|
|
|
hostPath:
|
|
|
|
path: "/dev"
|
|
|
|
|
|
|
|
|
2022-01-02 16:33:18 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2022-05-19 13:20:16 +00:00
|
|
|
name: pca9685-steering
|
2022-01-02 16:33:18 +00:00
|
|
|
annotations:
|
|
|
|
reloader.stakater.com/auto: "true"
|
|
|
|
spec:
|
|
|
|
revisionHistoryLimit: 0
|
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
component: pca9685
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
component: pca9685
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: pca9685
|
2022-05-19 13:20:16 +00:00
|
|
|
image: docker.io/cyrilix/robocar-pca9685-python
|
2022-01-02 16:33:18 +00:00
|
|
|
args:
|
2022-05-24 17:19:22 +00:00
|
|
|
- "steering"
|
2022-05-19 13:20:16 +00:00
|
|
|
- "--i2c-bus=1"
|
|
|
|
- "--i2c-address=40"
|
|
|
|
- "--pca9685-channel=0"
|
|
|
|
- "--left-pulse=$(STEERING_LEFT_PWM)"
|
|
|
|
- "--right-pulse=$(STEERING_RIGHT_PWM)"
|
2022-05-24 17:19:22 +00:00
|
|
|
- "--debug"
|
2022-01-02 16:33:18 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 1234
|
|
|
|
runAsGroup: 998 # Set 998/i2c group to access to i2c device
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /dev/i2c-1
|
|
|
|
name: i2c
|
|
|
|
env:
|
|
|
|
- name: MQTT_BROKER
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
2022-05-24 17:19:22 +00:00
|
|
|
key: MQTT_BROKER_HOST
|
2022-01-02 16:33:18 +00:00
|
|
|
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
|
2022-05-24 17:19:22 +00:00
|
|
|
value: rc-pca9685-steering
|
2022-05-19 13:20:16 +00:00
|
|
|
- name: MQTT_TOPIC
|
2022-01-02 16:33:18 +00:00
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MQTT_TOPIC_STEERING
|
|
|
|
name: robocar
|
|
|
|
- name: MQTT_QOS
|
|
|
|
value: "0"
|
2022-01-28 17:05:36 +00:00
|
|
|
- name: STEERING_LEFT_PWM
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: robocar-pca9685
|
|
|
|
key: STEERING_LEFT_PWM
|
|
|
|
- name: STEERING_RIGHT_PWM
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: robocar-pca9685
|
|
|
|
key: STEERING_RIGHT_PWM
|
|
|
|
- name: STEERING_CENTER_PWM
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: robocar-pca9685
|
|
|
|
key: STEERING_CENTER_PWM
|
2022-01-02 16:33:18 +00:00
|
|
|
- name: TZ
|
|
|
|
value: "Europe/Paris"
|
|
|
|
volumes:
|
|
|
|
- name: i2c
|
|
|
|
hostPath:
|
|
|
|
path: /dev/i2c-1
|
|
|
|
type: CharDevice
|
2022-05-19 13:20:16 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: pca9685-throttle
|
|
|
|
annotations:
|
|
|
|
reloader.stakater.com/auto: "true"
|
|
|
|
spec:
|
|
|
|
revisionHistoryLimit: 0
|
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
component: pca9685
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
component: pca9685
|
|
|
|
spec:
|
|
|
|
containers:
|
2022-05-24 17:19:22 +00:00
|
|
|
- name: pca9685-throttle
|
2022-05-19 13:20:16 +00:00
|
|
|
image: docker.io/cyrilix/robocar-pca9685-python
|
|
|
|
args:
|
2022-05-24 17:19:22 +00:00
|
|
|
- "throttle"
|
2022-05-19 13:20:16 +00:00
|
|
|
- "--zero-pulse=378"
|
|
|
|
- "--min-pulse=250"
|
|
|
|
- "--max-pulse=500"
|
|
|
|
- "--i2c-bus=1"
|
|
|
|
- "--i2c-address=40"
|
|
|
|
- "--pca9685-channel=1"
|
2022-05-24 17:19:22 +00:00
|
|
|
- "--debug"
|
2022-05-19 13:20:16 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 1234
|
|
|
|
runAsGroup: 998 # Set 998/i2c group to access to i2c device
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /dev/i2c-1
|
|
|
|
name: i2c
|
|
|
|
env:
|
|
|
|
- name: MQTT_BROKER
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
2022-05-24 17:19:22 +00:00
|
|
|
key: MQTT_BROKER_HOST
|
2022-05-19 13:20:16 +00:00
|
|
|
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
|
2022-05-24 17:19:22 +00:00
|
|
|
value: rc-pca9685-throttle
|
2022-05-19 13:20:16 +00:00
|
|
|
- name: MQTT_TOPIC
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MQTT_TOPIC_THROTTLE
|
|
|
|
name: robocar
|
|
|
|
- name: MQTT_QOS
|
|
|
|
value: "0"
|
|
|
|
- name: TZ
|
|
|
|
value: "Europe/Paris"
|
|
|
|
volumes:
|
|
|
|
- name: i2c
|
|
|
|
hostPath:
|
|
|
|
path: /dev/i2c-1
|
|
|
|
type: CharDevice
|