Compare commits

..

No commits in common. "c6f5f8a1851322fe9924441f11187ac10a73355a" and "e446025e7657a16ae11d022df315a519362acec7" have entirely different histories.

12 changed files with 26 additions and 180 deletions

View File

@ -117,10 +117,8 @@ spec:
- name: dev
mountPath: /dev
env:
- name: MQTT_BROKER_HOST
- name: MQTT_BROKER
value: localhost # because use host network
- name: MQTT_BROKER_PORT
value: "30183"
- name: MQTT_USERNAME
valueFrom:
secretKeyRef:

View File

@ -17,4 +17,4 @@ images:
newTag: v0.6.4
- name: docker.io/cyrilix/robocar-oak-camera
newTag: v0.2.0
newTag: v0.1.0-2-g52c3808

View File

@ -4,9 +4,8 @@ metadata:
name: robocar
data:
# Broker configuration
MQTT_BROKER_HOST: nats-server.nats.svc.cluster.local
#MQTT_BROKER: "tcp://mqtt.robocar.svc.cluster.local:1883"
MQTT_BROKER: "tcp://nats-server.nats.svc.cluster.local:1883"
MQTT_BROKER_HOST: mqtt.robocar.svc.cluster.local
MQTT_BROKER: "tcp://mqtt.robocar.svc.cluster.local:1883"
# Camera
MQTT_TOPIC_CAMERA: car/satanas/part/camera/color
@ -115,6 +114,7 @@ metadata:
data:
# model to use for steering
MODEL_STEERING: model_categorical_160x120h0_edgetpu.tflite
#MODEL_STEERING: model_categorical_160x120h0_edgetpu.tflite
#MODEL_STEERING: model_linear_160x120h40_edgetpu.tflite
@ -181,14 +181,3 @@ data:
"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 ]
}

View File

@ -418,10 +418,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"
- "-log=info"
securityContext:
runAsUser: 1234
runAsGroup: 1234
@ -458,16 +456,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 +470,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

View File

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Endpoints
metadata:
name: mqtt
labels:
app: mqtt
subsets:
- addresses:
- ip: 192.168.2.221
# - ip: 192.168.217.19
ports:
- port: 1883

View File

@ -4,21 +4,23 @@ kind: Kustomization
resources:
- deployments.yaml
- endpoints.yaml
- services.yaml
- configmap.yaml
images:
- name: docker.io/cyrilix/robocar-arduino
newTag: v0.9.0
newTag: v0.8.0-6-gadb38c3
- name: docker.io/cyrilix/robocar-led
newTag: v0.5.1
- name: docker.io/cyrilix/robocar-steering-tflite-edgetpu
newTag: v0.5.3
#newTag: v0.5.0
newTag: v0.5.0-1-gbc90193
- name: docker.io/cyrilix/robocar-throttle
newTag: v0.6.0
newTag: v0.5.0
- name: docker.io/cyrilix/robocar-record
newTag: v0.5.1
@ -27,7 +29,7 @@ images:
newTag: v0.2.1
- name: docker.io/cyrilix/robocar-steering
newTag: v0.6.0
newTag: v0.5.1-24-g424b697
- name: docker.io/cyrilix/robocar-road
newTag: v0.2.0

View File

@ -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
}

View File

@ -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

View File

@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: nats

View File

@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: nats-server
automountServiceAccountToken: false

View File

@ -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

View File

@ -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