microservices: deploy k8s stack
This commit is contained in:
@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: robocar-simulator
|
||||
data:
|
||||
#############
|
||||
# Simulator #
|
||||
#############
|
||||
SIMULATOR_ADDRESS: "192.168.2.237:9091"
|
||||
MQTT_TOPIC_SIMULATOR_STEERING: car/satanas/part/simulator/steering
|
||||
MQTT_TOPIC_SIMULATOR_THROTTLE: car/satanas/part/simulator/throttle
|
@ -0,0 +1,96 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: simulator
|
||||
annotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
spec:
|
||||
revisionHistoryLimit: 0
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
component: simulator
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: simulator
|
||||
spec:
|
||||
containers:
|
||||
- name: simulator
|
||||
image: docker.io/cyrilix/robocar-simulator
|
||||
args:
|
||||
- "-simulator-address=$(SIMULATOR_ADDRESS)"
|
||||
- "-car-style=donkey"
|
||||
- "-car-name=Satanas"
|
||||
- "-car-color=100,0,255"
|
||||
- "-camera-img-h=$(CAMERA_HEIGHT)"
|
||||
- "-camera-img-w=$(CAMERA_WIDTH)"
|
||||
- "-debug=false"
|
||||
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-simulator
|
||||
- name: MQTT_TOPIC_CAMERA
|
||||
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_TOPIC_STEERING
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_SIMULATOR_STEERING
|
||||
name: robocar-simulator
|
||||
- name: MQTT_TOPIC_THROTTLE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_SIMULATOR_THROTTLE
|
||||
name: robocar-simulator
|
||||
- name: MQTT_TOPIC_STEERING_CTRL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_STEERING
|
||||
name: robocar
|
||||
- name: MQTT_TOPIC_THROTTLE_CTRL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_THROTTLE
|
||||
name: robocar
|
||||
- name: SIMULATOR_ADDRESS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: SIMULATOR_ADDRESS
|
||||
name: robocar-simulator
|
||||
- name: MQTT_QOS
|
||||
value: "0"
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
@ -0,0 +1,14 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: robocar
|
||||
|
||||
resources:
|
||||
- ../common
|
||||
- deployments.yaml
|
||||
- configmap.yaml
|
||||
|
||||
images:
|
||||
- name: docker.io/cyrilix/robocar-simulator
|
||||
newTag: v0.3.0
|
Reference in New Issue
Block a user