diff --git a/edge-helm-charts/charts/node-red/templates/node-red.yaml b/edge-helm-charts/charts/node-red/templates/node-red.yaml index cacb06a5..3e837543 100644 --- a/edge-helm-charts/charts/node-red/templates/node-red.yaml +++ b/edge-helm-charts/charts/node-red/templates/node-red.yaml @@ -36,6 +36,11 @@ spec: - name: config configMap: name: node-red-{{ .Values.uuid }} +{{- range $ix, $dev := .Values.devices }} + - name: device-{{ $ix }} + hostPath: + path: "{{ $dev }}" +{{- end }} securityContext: runAsUser: 1000 initContainers: @@ -58,6 +63,10 @@ spec: volumeMounts: - mountPath: /data name: data +{{- range $ix, $dev := .Values.devices }} + - mountPath: "{{ $dev }}" + name: device-{{ $ix }} +{{- end }} {{- if .Values.mqttBroker }} - name: mqtt-broker {{- with .Values.image.mqttBroker }} diff --git a/edge-helm-charts/charts/node-red/values.yaml b/edge-helm-charts/charts/node-red/values.yaml index 6a35dcdb..d26d45e3 100644 --- a/edge-helm-charts/charts/node-red/values.yaml +++ b/edge-helm-charts/charts/node-red/values.yaml @@ -13,6 +13,8 @@ image: flow: null # If this is true we deploy an MQTT broker sidecar mqttBroker: false +# Devices to map in from the host +devices: [] # This is required # uuid: 12345 # This deploys to a specific host