Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow node-red chart to map in devices #325

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions edge-helm-charts/charts/node-red/templates/node-red.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions edge-helm-charts/charts/node-red/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading