Compare commits
2 Commits
c6f5f8a185
...
fix/pca968
Author | SHA1 | Date | |
---|---|---|---|
de8e22db1d | |||
3f31891de1 |
@ -2,19 +2,12 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: robocar-pca9685-pwm
|
||||
name: robocar-pca9685
|
||||
data:
|
||||
############################
|
||||
# STEERING PWM - PCA9685 #
|
||||
############################
|
||||
STEERING_PCA9685_LEFT_PWM: "995"
|
||||
STEERING_PCA9685_RIGHT_PWM: "2017"
|
||||
STEERING_PCA9685_CENTER_PWM: "1440"
|
||||
|
||||
###########################
|
||||
# THROTTLE PWM - PCA9685 #
|
||||
############################
|
||||
THROTTLE_PCA9685_MIN_PWM: "994"
|
||||
THROTTLE_PCA9685_MAX_PWM: "1975"
|
||||
THROTTLE_PCA9685_ZERO_PWM: "1420"
|
||||
################
|
||||
# STEERING PWM #
|
||||
################
|
||||
STEERING_LEFT_PWM: "1092"
|
||||
STEERING_RIGHT_PWM: "1986"
|
||||
STEERING_CENTER_PWM: "1583"
|
||||
|
||||
|
@ -107,7 +107,6 @@ spec:
|
||||
args:
|
||||
- "--image-width=$(CAMERA_WIDTH)"
|
||||
- "--image-height=$(CAMERA_HEIGHT)"
|
||||
- "--objects-threshold=$(THRESHOLD_OBJECTS)"
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
privileged: true
|
||||
@ -117,10 +116,11 @@ spec:
|
||||
- name: dev
|
||||
mountPath: /dev
|
||||
env:
|
||||
- name: MQTT_BROKER_HOST
|
||||
value: localhost # because use host network
|
||||
- name: MQTT_BROKER_PORT
|
||||
value: "30183"
|
||||
- name: MQTT_BROKER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_BROKER_HOST
|
||||
name: robocar
|
||||
- name: MQTT_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@ -138,16 +138,6 @@ spec:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_CAMERA_OAK_COLOR
|
||||
name: robocar
|
||||
- name: MQTT_TOPIC_OBJECTS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_OBJECTS
|
||||
name: robocar
|
||||
- name: THRESHOLD_OBJECTS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: THRESHOLD
|
||||
name: robocar-objects
|
||||
- name: CAMERA_WIDTH
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -176,7 +166,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pca9685
|
||||
name: pca9685-steering
|
||||
annotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
spec:
|
||||
@ -194,20 +184,15 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: pca9685
|
||||
image: docker.io/cyrilix/robocar-pca9685
|
||||
image: docker.io/cyrilix/robocar-pca9685-python
|
||||
args:
|
||||
- "--mqtt-retain=false"
|
||||
- "--throttle-channel=15"
|
||||
- "--steering-channel=14"
|
||||
- "--throttle-zero-pwm=$(THROTTLE_PCA9685_ZERO_PWM)"
|
||||
- "--throttle-min-pwm=$(THROTTLE_PCA9685_MIN_PWM)"
|
||||
- "--throttle-max-pwm=$(THROTTLE_PCA9685_MAX_PWM)"
|
||||
- "--steering-left-pwm=$(STEERING_PCA9685_LEFT_PWM)"
|
||||
- "--steering-right-pwm=$(STEERING_PCA9685_RIGHT_PWM)"
|
||||
- "--steering-center-pwm=$(STEERING_PCA9685_CENTER_PWM)"
|
||||
- "--pwm-freq=50"
|
||||
- "--update-pwm-frequency=25"
|
||||
- "--log=info"
|
||||
- "steering"
|
||||
- "--i2c-bus=1"
|
||||
- "--i2c-address=40"
|
||||
- "--pca9685-channel=0"
|
||||
- "--left-pulse=$(STEERING_LEFT_PWM)"
|
||||
- "--right-pulse=$(STEERING_RIGHT_PWM)"
|
||||
- "--debug"
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
runAsGroup: 998 # Set 998/i2c group to access to i2c device
|
||||
@ -215,14 +200,11 @@ spec:
|
||||
volumeMounts:
|
||||
- mountPath: /dev/i2c-1
|
||||
name: i2c
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: robocar-pca9685-pwm
|
||||
env:
|
||||
- name: MQTT_BROKER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_BROKER
|
||||
key: MQTT_BROKER_HOST
|
||||
name: robocar
|
||||
- name: MQTT_USERNAME
|
||||
valueFrom:
|
||||
@ -235,19 +217,100 @@ spec:
|
||||
key: MQTT_PASSWORD
|
||||
name: mqtt-credentials
|
||||
- name: MQTT_CLIENT_ID
|
||||
value: rc-pca9685
|
||||
- name: MQTT_TOPIC_THROTTLE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_THROTTLE
|
||||
name: robocar
|
||||
- name: MQTT_TOPIC_STEERING
|
||||
value: rc-pca9685-steering
|
||||
- name: MQTT_TOPIC
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_STEERING
|
||||
name: robocar
|
||||
- name: MQTT_QOS
|
||||
value: "0"
|
||||
- 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
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
volumes:
|
||||
- name: i2c
|
||||
hostPath:
|
||||
path: /dev/i2c-1
|
||||
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:
|
||||
|
@ -13,8 +13,8 @@ images:
|
||||
- name: docker.io/cyrilix/robocar-camera
|
||||
newTag: v0.3.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-pca9685
|
||||
newTag: v0.6.4
|
||||
- name: docker.io/cyrilix/robocar-pca9685-python
|
||||
newTag: v0.1.0-12-g2966f92
|
||||
|
||||
- name: docker.io/cyrilix/robocar-oak-camera
|
||||
newTag: v0.2.0
|
||||
newTag: v0.1.0
|
@ -4,16 +4,14 @@ metadata:
|
||||
name: robocar
|
||||
data:
|
||||
# Broker configuration
|
||||
MQTT_BROKER_HOST: nats-server.nats.svc.cluster.local
|
||||
MQTT_BROKER_HOST: 192.168.2.221
|
||||
MQTT_BROKER: "tcp://192.168.2.221:1883"
|
||||
#MQTT_BROKER: "tcp://mqtt.robocar.svc.cluster.local:1883"
|
||||
MQTT_BROKER: "tcp://nats-server.nats.svc.cluster.local:1883"
|
||||
|
||||
# Camera
|
||||
MQTT_TOPIC_CAMERA: car/satanas/part/camera/color
|
||||
MQTT_TOPIC_CAMERA: car/satanas/part/camera/camera/color
|
||||
MQTT_TOPIC_CAMERA_OAK_COLOR: car/satanas/part/camera/color
|
||||
|
||||
# Objects detection
|
||||
MQTT_TOPIC_OBJECTS: car/satanas/part/objects
|
||||
|
||||
# Radio command
|
||||
MQTT_TOPIC_RC_THROTTLE: car/satanas/part/rc/throttle
|
||||
@ -34,9 +32,6 @@ data:
|
||||
# Records topic
|
||||
MQTT_TOPIC_RECORDS: car/satanas/part/records
|
||||
|
||||
# Feedbacks
|
||||
MQTT_TOPIC_THROTTLE_FEEDBACK: car/satanas/part/feedback/throttle
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -46,10 +41,8 @@ data:
|
||||
############
|
||||
# Throttle #
|
||||
############
|
||||
THROTTLE_MIN: "0.2"
|
||||
THROTTLE_MAX: "0.3"
|
||||
|
||||
|
||||
THROTTLE_MIN: "0.3"
|
||||
THROTTLE_MAX: "0.4"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -59,36 +52,9 @@ data:
|
||||
################
|
||||
# STEERING PWM #
|
||||
################
|
||||
STEERING_LEFT_PWM: "1000"
|
||||
STEERING_LEFT_PWM: "1002"
|
||||
STEERING_RIGHT_PWM: "1985"
|
||||
STEERING_CENTER_PWM: "1492"
|
||||
|
||||
############################
|
||||
# STEERING PWM - SECOND RC #
|
||||
############################
|
||||
STEERING_SECONDARY_LEFT_PWM: "1119"
|
||||
STEERING_SECONDARY_RIGHT_PWM: "2141"
|
||||
STEERING_SECONDARY_CENTER_PWM: "1641"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: robocar-throttle-pwm
|
||||
data:
|
||||
################
|
||||
# THROTTLE PWM #
|
||||
################
|
||||
THROTTLE_MIN_PWM: "994"
|
||||
THROTTLE_MAX_PWM: "1979"
|
||||
THROTTLE_ZERO_PWM: "1484"
|
||||
|
||||
###########################
|
||||
# THROTTLE PWM - SECOND RC #
|
||||
############################
|
||||
THROTTLE_SECONDARY_MIN_PWM: "994"
|
||||
THROTTLE_SECONDARY_MAX_PWM: "1975"
|
||||
THROTTLE_SECONDARY_ZERO_PWM: "1506"
|
||||
STEERING_CENTER_PWM: "1491"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
@ -114,16 +80,10 @@ metadata:
|
||||
name: robocar-models
|
||||
data:
|
||||
# model to use for steering
|
||||
MODEL_STEERING: model_categorical_160x120h0_edgetpu.tflite
|
||||
|
||||
#MODEL_STEERING: model_linear_160x120h40_edgetpu.tflite
|
||||
|
||||
|
||||
#MODEL_STEERING: model_linear_160x120h20_edgetpu.tflite
|
||||
#MODEL_STEERING: model_categorical_160x120h20_edgetpu.tflite
|
||||
|
||||
|
||||
#MODEL_STEERING: model_linear_160x120h50_edgetpu.tflite
|
||||
MODEL_STEERING: model_160x120h0_edgetpu.tflite
|
||||
MODEL_STEERING3: model_edgetpu.tflite
|
||||
MODEL_STEERING4: model_160x120h20_edgetpu.tflite
|
||||
MODEL_STEERING2: model-sim-bigimg_edgetpu.tflite
|
||||
|
||||
MODEL_IMAGE_WIDTH: "160"
|
||||
MODEL_IMAGE_HEIGHT: "120"
|
||||
@ -136,59 +96,3 @@ metadata:
|
||||
name: robocar-road
|
||||
data:
|
||||
HORIZON: "20"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: steering
|
||||
data:
|
||||
grid.json: |
|
||||
{
|
||||
"steering_steps": [ -1, -0.66, -0.33, 0, 0.33, 0.66, 1],
|
||||
"distance_steps": [ 0, 0.3, 0.4, 0.5, 0.8, 1],
|
||||
"data": [
|
||||
[ 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0.25, -0.25, 0, 0],
|
||||
[ 0, 0.25, 0.5, -0.5, -0.25, 0],
|
||||
[ 0.25, 0.5, 1, -1, -0.5, -0.25]
|
||||
]
|
||||
}
|
||||
|
||||
"omf.json": |
|
||||
{
|
||||
"steering_steps":[-1, -0.66, -0.33, 0, 0.33, 0.66, 1],
|
||||
"distance_steps": [0, 0.2, 0.4, 0.6, 0.8, 1],
|
||||
"data": [
|
||||
[0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0],
|
||||
[0, 0.25, 0, 0, -0.25, 0],
|
||||
[0.5, 0.25, 0, 0, -0.5, -0.25]
|
||||
]
|
||||
}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: android
|
||||
data:
|
||||
thresholds.json: |
|
||||
{
|
||||
"threshold_steps": [ 0.07, 0.08, 0.09, 0.1, 0.125, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0 ],
|
||||
"min_valid": 500,
|
||||
"data": [ 8700, 4800, 3500, 2550, 1850, 1387, 992, 840, 750, 700, 655, 620, 590, 570, 553, 549, 548 ]
|
||||
}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: throttle
|
||||
data:
|
||||
brake.json: |
|
||||
{
|
||||
"delta_steps": [ 0.05, 0.3, 0.5 ],
|
||||
"data": [ -0.1, -0.5, -1.0 ]
|
||||
}
|
||||
|
@ -28,31 +28,14 @@ spec:
|
||||
- "--steering-left-pwm=$(STEERING_LEFT_PWM)"
|
||||
- "--steering-right-pwm=$(STEERING_RIGHT_PWM)"
|
||||
- "--steering-center-pwm=$(STEERING_CENTER_PWM)"
|
||||
- "--steering-secondary-left-pwm=$(STEERING_SECONDARY_LEFT_PWM)"
|
||||
- "--steering-secondary-right-pwm=$(STEERING_SECONDARY_RIGHT_PWM)"
|
||||
- "--steering-secondary-center-pwm=$(STEERING_SECONDARY_CENTER_PWM)"
|
||||
- "--throttle-min-pwm=$(THROTTLE_MIN_PWM)"
|
||||
- "--throttle-max-pwm=$(THROTTLE_MAX_PWM)"
|
||||
- "--throttle-center-pwm=$(THROTTLE_ZERO_PWM)"
|
||||
- "--throttle-secondary-min-pwm=$(THROTTLE_SECONDARY_MIN_PWM)"
|
||||
- "--throttle-secondary-max-pwm=$(THROTTLE_SECONDARY_MAX_PWM)"
|
||||
- "--throttle-secondary-center-pwm=$(THROTTLE_SECONDARY_ZERO_PWM)"
|
||||
- '--throttle-feedback-config=/etc/robocar/thresholds.json'
|
||||
- "-log=info"
|
||||
volumeMounts:
|
||||
- mountPath: "/dev/ttyAMA0"
|
||||
- mountPath: "/dev/ttyAMA1"
|
||||
name: serial
|
||||
- mountPath: "/etc/robocar"
|
||||
name: robocar
|
||||
securityContext:
|
||||
privileged: true
|
||||
runAsUser: 1234
|
||||
runAsGroup: 20 # Set 20/dialout group to access to serial device
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: robocar-throttle-pwm
|
||||
- configMapRef:
|
||||
name: robocar-steering-pwm
|
||||
env:
|
||||
- name: MQTT_BROKER
|
||||
valueFrom:
|
||||
@ -91,23 +74,30 @@ spec:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_RC_SWITCH_RECORD
|
||||
name: robocar
|
||||
- name: MQTT_TOPIC_THROTTLE_FEEDBACK
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar
|
||||
key: MQTT_TOPIC_THROTTLE_FEEDBACK
|
||||
- name: MQTT_QOS
|
||||
value: "0"
|
||||
- name: STEERING_LEFT_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-steering-pwm
|
||||
key: STEERING_LEFT_PWM
|
||||
- name: STEERING_RIGHT_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-steering-pwm
|
||||
key: STEERING_RIGHT_PWM
|
||||
- name: STEERING_CENTER_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-steering-pwm
|
||||
key: STEERING_CENTER_PWM
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
volumes:
|
||||
- name: serial
|
||||
hostPath:
|
||||
path: /dev/ttyAMA0
|
||||
path: /dev/ttyAMA1
|
||||
type: CharDevice
|
||||
- name: robocar
|
||||
configMap:
|
||||
name: android
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
@ -217,6 +207,9 @@ spec:
|
||||
args:
|
||||
- "--model=/model/$(MODEL_STEERING)"
|
||||
- "--edge-verbosity=0"
|
||||
- "--img-width=$(MODEL_IMAGE_WIDTH)"
|
||||
- "--img-height=$(MODEL_IMAGE_HEIGHT)"
|
||||
- "--horizon=$(HORIZON)"
|
||||
- "--log=info"
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
@ -250,7 +243,7 @@ spec:
|
||||
- name: MQTT_TOPIC_CAMERA
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_CAMERA_OAK_COLOR
|
||||
key: MQTT_TOPIC_CAMERA
|
||||
name: robocar
|
||||
- name: MQTT_TOPIC_STEERING
|
||||
valueFrom:
|
||||
@ -319,13 +312,6 @@ spec:
|
||||
image: docker.io/cyrilix/robocar-steering
|
||||
args:
|
||||
- "-mqtt-retain=false"
|
||||
- "--image-width=$(IMAGE_WIDTH)"
|
||||
- "--image-height=$(IMAGE_HEIGHT)"
|
||||
- "--enable-objects-correction=true"
|
||||
- "--enable-objects-correction-user=false"
|
||||
- "--grid-map-config=/etc/robocar/grid.json"
|
||||
- "--objects-move-factors-config=/etc/robocar/omf.json"
|
||||
- "--delta-middle=0.1"
|
||||
- "-log=info"
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
@ -368,32 +354,10 @@ spec:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_RC_DRIVE_MODE
|
||||
name: robocar
|
||||
- name: MQTT_TOPIC_OBJECTS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_OBJECTS
|
||||
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"
|
||||
volumeMounts:
|
||||
- mountPath: /etc/robocar
|
||||
name: robocar-configs
|
||||
volumes:
|
||||
- name: robocar-configs
|
||||
configMap:
|
||||
name: steering
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@ -418,10 +382,8 @@ spec:
|
||||
- name: throttle
|
||||
image: docker.io/cyrilix/robocar-throttle
|
||||
args:
|
||||
- "--mqtt-retain=false"
|
||||
- "--enable-brake-feature=true"
|
||||
- "--brake-configuration=/etc/robocar/brake.json"
|
||||
- "--log=info"
|
||||
- "-mqtt-retain=false"
|
||||
- "-debug=false"
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
runAsGroup: 1234
|
||||
@ -458,16 +420,6 @@ spec:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_RC_DRIVE_MODE
|
||||
name: robocar
|
||||
- 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
|
||||
- name: THROTTLE_MIN
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -482,13 +434,6 @@ spec:
|
||||
value: "0"
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
volumeMounts:
|
||||
- mountPath: /etc/robocar
|
||||
name: throttle-config
|
||||
volumes:
|
||||
- name: throttle-config
|
||||
configMap:
|
||||
name: throttle
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@ -635,7 +580,7 @@ metadata:
|
||||
reloader.stakater.com/auto: "true"
|
||||
spec:
|
||||
revisionHistoryLimit: 0
|
||||
replicas: 0
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Endpoints
|
||||
metadata:
|
||||
name: mqtt
|
||||
labels:
|
||||
app: mqtt
|
||||
subsets:
|
||||
- addresses:
|
||||
- ip: 192.168.2.221
|
||||
ports:
|
||||
- port: 1883
|
@ -4,30 +4,31 @@ kind: Kustomization
|
||||
|
||||
resources:
|
||||
- deployments.yaml
|
||||
- endpoints.yaml
|
||||
- services.yaml
|
||||
- configmap.yaml
|
||||
|
||||
images:
|
||||
- name: docker.io/cyrilix/robocar-arduino
|
||||
newTag: v0.9.0
|
||||
newTag: v0.6.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-led
|
||||
newTag: v0.5.1
|
||||
newTag: v0.5.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-steering-tflite-edgetpu
|
||||
newTag: v0.5.3
|
||||
newTag: v0.4.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-throttle
|
||||
newTag: v0.6.0
|
||||
newTag: v0.4.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-record
|
||||
newTag: v0.5.1
|
||||
newTag: v0.5.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-recorder-store
|
||||
newTag: v0.2.1
|
||||
newTag: v0.2.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-steering
|
||||
newTag: v0.6.0
|
||||
newTag: v0.5.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-road
|
||||
newTag: v0.2.0
|
||||
newTag: v0.1.0-5-gdc6e465
|
||||
|
@ -1,18 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nats
|
||||
data:
|
||||
standalone.conf: |
|
||||
server_name: nats
|
||||
http: 0.0.0.0:8222
|
||||
jetstream {
|
||||
store_dir: /data/datastore
|
||||
}
|
||||
mqtt {
|
||||
listen: 0.0.0.0:1883
|
||||
}
|
||||
authorization: {
|
||||
user: satanas,
|
||||
password: satanas
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: nats
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- serviceaccount.yaml
|
||||
- configmaps.yaml
|
||||
- statefulset.yaml
|
||||
- services.yaml
|
@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: nats
|
@ -1,5 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: nats-server
|
||||
automountServiceAccountToken: false
|
@ -1,41 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nats-server-ext
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 4222
|
||||
name: tcp-nats-client
|
||||
targetPort: tcp-nats-client
|
||||
nodePort: 30422
|
||||
- name: http-monitoring
|
||||
port: 8222
|
||||
targetPort: http-monitoring
|
||||
nodePort: 30822
|
||||
- name: tcp-mqtt
|
||||
port: 1883
|
||||
targetPort: tcp-mqtt
|
||||
nodePort: 30183
|
||||
selector:
|
||||
appli: nats-server
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nats-server
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 4222
|
||||
name: tcp-nats-client
|
||||
targetPort: tcp-nats-client
|
||||
- name: http-monitoring
|
||||
port: 8222
|
||||
targetPort: http-monitoring
|
||||
- name: tcp-mqtt
|
||||
port: 1883
|
||||
targetPort: tcp-mqtt
|
||||
selector:
|
||||
appli: nats-server
|
@ -1,58 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: nats-server
|
||||
annotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
appli: nats-server
|
||||
serviceName: nats
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 0
|
||||
template:
|
||||
metadata:
|
||||
name: nats-server
|
||||
labels:
|
||||
appli: nats-server
|
||||
spec:
|
||||
serviceAccountName: nats-server
|
||||
containers:
|
||||
- name: nats-server
|
||||
image: docker.io/library/nats:latest
|
||||
args:
|
||||
- --http_port=8222
|
||||
- --config=/etc/nats/standalone.conf
|
||||
ports:
|
||||
- containerPort: 4222
|
||||
name: tcp-nats-client
|
||||
- name: http-monitoring
|
||||
containerPort: 8222
|
||||
- name: tcp-mqtt
|
||||
containerPort: 1883
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nats
|
||||
name: nats-config
|
||||
- name: nats-data
|
||||
mountPath: /data
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
runAsGroup: 1234
|
||||
fsGroup: 1234
|
||||
fsGroupChangePolicy: Always
|
||||
volumes:
|
||||
- name: nats-config
|
||||
configMap:
|
||||
name: nats
|
||||
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: nats-data
|
||||
spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
@ -11,4 +11,4 @@ resources:
|
||||
|
||||
images:
|
||||
- name: docker.io/cyrilix/robocar-simulator
|
||||
newTag: v0.4.1
|
||||
newTag: v0.4.0
|
||||
|
Reference in New Issue
Block a user