Compare commits
2 Commits
master
...
fix/pca968
Author | SHA1 | Date | |
---|---|---|---|
de8e22db1d | |||
3f31891de1 |
@ -166,7 +166,7 @@ spec:
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: pca9685
|
name: pca9685-steering
|
||||||
annotations:
|
annotations:
|
||||||
reloader.stakater.com/auto: "true"
|
reloader.stakater.com/auto: "true"
|
||||||
spec:
|
spec:
|
||||||
@ -184,19 +184,15 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: pca9685
|
- name: pca9685
|
||||||
image: docker.io/cyrilix/robocar-pca9685
|
image: docker.io/cyrilix/robocar-pca9685-python
|
||||||
args:
|
args:
|
||||||
- "--mqtt-retain=false"
|
- "steering"
|
||||||
- "--throttle-channel=1"
|
- "--i2c-bus=1"
|
||||||
- "--steering-channel=0"
|
- "--i2c-address=40"
|
||||||
- "--throttle-zero-pwm=378"
|
- "--pca9685-channel=0"
|
||||||
- "--throttle-min-pwm=250"
|
- "--left-pulse=$(STEERING_LEFT_PWM)"
|
||||||
- "--throttle-max-pwm=500"
|
- "--right-pulse=$(STEERING_RIGHT_PWM)"
|
||||||
- "--steering-left-pwm=$(STEERING_LEFT_PWM)"
|
- "--debug"
|
||||||
- "--steering-right-pwm=$(STEERING_RIGHT_PWM)"
|
|
||||||
- "--steering-center-pwm=$(STEERING_CENTER_PWM)"
|
|
||||||
- "--update-pwm-frequency=10"
|
|
||||||
- "--log=info"
|
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1234
|
runAsUser: 1234
|
||||||
runAsGroup: 998 # Set 998/i2c group to access to i2c device
|
runAsGroup: 998 # Set 998/i2c group to access to i2c device
|
||||||
@ -208,7 +204,7 @@ spec:
|
|||||||
- name: MQTT_BROKER
|
- name: MQTT_BROKER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: MQTT_BROKER
|
key: MQTT_BROKER_HOST
|
||||||
name: robocar
|
name: robocar
|
||||||
- name: MQTT_USERNAME
|
- name: MQTT_USERNAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@ -221,13 +217,8 @@ spec:
|
|||||||
key: MQTT_PASSWORD
|
key: MQTT_PASSWORD
|
||||||
name: mqtt-credentials
|
name: mqtt-credentials
|
||||||
- name: MQTT_CLIENT_ID
|
- name: MQTT_CLIENT_ID
|
||||||
value: rc-pca9685
|
value: rc-pca9685-steering
|
||||||
- name: MQTT_TOPIC_THROTTLE
|
- name: MQTT_TOPIC
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
key: MQTT_TOPIC_THROTTLE
|
|
||||||
name: robocar
|
|
||||||
- name: MQTT_TOPIC_STEERING
|
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: MQTT_TOPIC_STEERING
|
key: MQTT_TOPIC_STEERING
|
||||||
@ -256,3 +247,74 @@ spec:
|
|||||||
hostPath:
|
hostPath:
|
||||||
path: /dev/i2c-1
|
path: /dev/i2c-1
|
||||||
type: CharDevice
|
type: CharDevice
|
||||||
|
---
|
||||||
|
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:
|
||||||
|
- name: pca9685-throttle
|
||||||
|
image: docker.io/cyrilix/robocar-pca9685-python
|
||||||
|
args:
|
||||||
|
- "throttle"
|
||||||
|
- "--zero-pulse=378"
|
||||||
|
- "--min-pulse=250"
|
||||||
|
- "--max-pulse=500"
|
||||||
|
- "--i2c-bus=1"
|
||||||
|
- "--i2c-address=40"
|
||||||
|
- "--pca9685-channel=1"
|
||||||
|
- "--debug"
|
||||||
|
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:
|
||||||
|
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-pca9685-throttle
|
||||||
|
- 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
|
||||||
|
@ -13,8 +13,8 @@ images:
|
|||||||
- name: docker.io/cyrilix/robocar-camera
|
- name: docker.io/cyrilix/robocar-camera
|
||||||
newTag: v0.3.0
|
newTag: v0.3.0
|
||||||
|
|
||||||
- name: docker.io/cyrilix/robocar-pca9685
|
- name: docker.io/cyrilix/robocar-pca9685-python
|
||||||
newTag: v0.5.0
|
newTag: v0.1.0-12-g2966f92
|
||||||
|
|
||||||
- name: docker.io/cyrilix/robocar-oak-camera
|
- name: docker.io/cyrilix/robocar-oak-camera
|
||||||
newTag: v0.1.0
|
newTag: v0.1.0
|
Loading…
Reference in New Issue
Block a user