node-red

by Schwarz IT

Helm chartv0.40.2App 4.1.2Apache-2.0Verified publisher

A Helm chart for Node-Red, a low-code programming for event-driven applications

About this chart

node-red ⚙

Description 📜

A Helm chart for Node-Red, a low-code programming for event-driven applications

Usage (via OCI Registry)

To install the chart using the OCI artifact, run:

helm install node-red oci://ghcr.io/schwarzit/charts/node-red --version 0.40.2

Usage

Adding node-red repository Before installing any chart provided by this repository, add the node-red Charts Repository:

helm repo add node-red https://schwarzit.github.io/node-red-chart/
helm repo update

Installing the Chart 📦

To install the chart with the release name node-red run:

helm install node-red node-red/node-red --version 0.40.2

After a few seconds, node-red should be running.

To install the chart in a specific namespace use following commands:

kubectl create ns node-red
helm install node-red node-red/node-red --namespace node-red

Tip: List all releases using helm list, a release is a name used to track a specific deployment

Uninstalling the Chart 🗑️

To uninstall the node-red deployment:

helm uninstall node-red

The command removes all the Kubernetes components associated with the chart and deletes the release.

Values

KeyTypeDefaultDescription
affinityobject{}The affinity constraint
clusterRoleRules.enabledboolfalseEnable custom rules for the application controller's ClusterRole resource default: false
clusterRoleRules.ruleslist[]List of custom rules for the application controller's ClusterRole resource default: []
deploymentAnnotationsobject{}Deployment annotations
deploymentStrategystring""Specifies the strategy used to replace old Pods by new ones, default: RollingUpdate
envlist[]node-red env, see more environment variables in the node-red documentation
envFromlist[]
extraSidecarslist[]You can configure extra sidecars containers to run alongside the node-red pod. default: []
extraVolumeMountsstringnilExtra Volume Mounts for the node-red pod
extraVolumesstringnilExtra Volumes for the pod
fullnameOverridestring""String to fully override "node-red.fullname"
image.pullPolicystring"IfNotPresent"The image pull policy
image.registrystring"docker.io"The image registry to pull from
image.repositorystring"nodered/node-red"The image repository to pull from
image.tagstring""The image tag to pull, default: Chart.appVersion
imagePullSecretsstring""The image pull secrets
ingress.annotationsobject{}Additional ingress annotations
ingress.classNamestring""Defines which ingress controller will implement the resource
ingress.enabledboolfalseEnable an ingress resource for the server
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].paths[0]object{"path":"/","pathType":"ImplementationSpecific"}The base path
ingress.hosts[0].paths[0].pathTypestring"ImplementationSpecific"Ingress type of path
ingress.tlslist[]Ingress TLS configuration
initContainerslist[]containers which are run before the app containers are started
livenessProbeobject{"httpGet":{"path":"/","port":"http"}}Liveness probe for the Deployment
metrics.enabledboolfalseDeploy metrics service
metrics.pathstring"/metrics"
metrics.serviceMonitor.additionalLabelsobject{}Prometheus ServiceMonitor labels
metrics.serviceMonitor.basicAuthobject{}Prometheus basicAuth configuration for ServiceMonitor endpoint
metrics.serviceMonitor.enabledboolfalseEnable a prometheus ServiceMonitor
metrics.serviceMonitor.intervalstring"30s"Prometheus ServiceMonitor interval
metrics.serviceMonitor.metricRelabelingslist[]Prometheus [MetricRelabelConfigs] to apply to samples before ingestion
metrics.serviceMonitor.namespacestring""Prometheus ServiceMonitor namespace
metrics.serviceMonitor.relabelingslist[]Prometheus [RelabelConfigs] to apply to samples before scraping
metrics.serviceMonitor.selectorobject{}Prometheus ServiceMonitor selector
nameOverridestring""Provide a name in place of node-red
nodeSelectorobject{}Node selector
npmrc.contentstring"# Custom npmrc config\n"Configuration to add custom npmrc config
npmrc.enabledboolfalseEnable custom npmrc config
npmrc.registrystring"https://registry.npmjs.org"Configuration to use any compatible registry
persistence.accessModestring"ReadWriteOnce"Persistence access mode
persistence.enabledboolfalseUse persistent volume to store data
persistence.keepPVCboolfalse## Keep a created Persistent volume claim when uninstalling the helm chart (default: false)
persistence.sizestring"5Gi"Size of persistent volume claim
podAnnotationsobject{}Pod annotations
podLabelsobject{}Labels to add to the node-red pod. default: {}
podSecurityContextobject{"fsGroup":1000,"runAsUser":1000}Pod Security Context see values.yaml
podSecurityContext.fsGroupint1000node-red group is 1000
podSecurityContext.runAsUserint1000node-red user is 1000
priorityClassNamestring""Priority class name for the node-red pod. default: ""
projectModeobject{"enabled":false}Enable Node-RED project mode for Git integration and project management Note: Project mode requires write access to the /data directory and may need additional security context adjustments depending on your cluster's security policies
rbac.createClusterRoleboolfalseCreate a ClusterRole resource for the node-red pod. default: false
rbac.enabledbooltrue
readinessProbeobject{"httpGet":{"path":"/","port":"http"}}Readiness probe for the Deployment
resourcesobject{"limits":{"memory":"512Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}CPU/Memory resource requests/limits
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":false,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}}Security Context see values.yaml
service.annotationsobject{}Annotations for the service
service.portint1880Kubernetes port where service is exposed
service.typestring"ClusterIP"Kubernetes service type
serviceAccount.annotationsobject{}Additional ServiceAccount annotations
serviceAccount.createbooltrueCreate service account
serviceAccount.namestring""Service account name to use, when empty will be set to created account if
settingsobject{}You can configure node-red using a settings file. default: {}
sidecar.enabledboolfalseEnable the sidecar
sidecar.env.labelstring"node-red-settings"Label that should be used for filtering
sidecar.env.label_valuestring"1"The value for the label you want to filter your resources on. Don't set a value to filter by any value
sidecar.env.methodstring"watch"If METHOD is set to LIST, the sidecar will just list config-maps/secrets and exit. With SLEEP it will list all config-maps/secrets, then sleep for SLEEP_TIME seconds. Anything else will continuously watch for changes (see https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes).
sidecar.env.passwordstring""Password as key value pair
sidecar.env.passwordFromExistingSecretobject{}Password from existing secret
sidecar.env.scriptstring"flow_refresh.py"Absolute path to shell script to execute after a configmap got reloaded.
sidecar.env.skip_initboolfalseSkip the initial request to REQ_URL when using watch mode (v2.1.0+)
sidecar.env.sleep_time_sidecarstring"5s"Set the sleep time for refresh script
sidecar.env.urlstring""Optional: Custom target URL for the sidecar. If left empty, the internal service cluster URL is used automatically.
sidecar.env.usernamestring""
sidecar.extraEnvlist[]Extra Environments for the sidecar
sidecar.extraNodeModuleslist[]Extra Node-Modules that will be installed from the sidecar script
sidecar.image.pullPolicystring"IfNotPresent"The image pull policy, default: IfNotPresent
sidecar.image.registrystring"quay.io"The image registry to pull the sidecar from
sidecar.image.repositorystring"kiwigrid/k8s-sidecar"The image repository to pull from
sidecar.image.tagstring"2.5.0"The image tag to pull, default: 2.5.0
sidecar.livenessProbeobject{"httpGet":{"path":"/healthz","port":8080},"initialDelaySeconds":5,"periodSeconds":10}Liveness probe for the sidecar (k8s-sidecar v2+ exposes /healthz on port 8080)
sidecar.readinessProbeobject{"httpGet":{"path":"/healthz","port":8080},"initialDelaySeconds":5,"periodSeconds":10}Readiness probe for the sidecar (reports ready after initial sync completes)
sidecar.resourcesobject{}Resources for the sidecar
sidecar.securityContextobject{}Security context for the sidecar
sidecar.volumeMountslist[]The extra volume mounts for the sidecar
startupProbeobject{"httpGet":{"path":"/","port":"http"}}Startup probe for the Deployment
terminationGracePeriodSecondsint30The terminationGracePeriodSeconds for the pod here we explicitly set the default value defined in kubernetes https://github.com/kubernetes/api/blob/d4b94f478bb2e6467873657dd7b4e1b0ac8351be/core/v1/types.go#L3114-L3118
tolerationslist[]Toleration labels for pod assignment

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

helm install node-red node-red/node-red --set image.tag=latest

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install node-red node-red/node-red -f values.yaml

Tip: You can use the default values.yaml

Monitoring 🌡️

To enable the node-red prometheus monitoring capability, you need to install the node node-red-contrib-prometheus-exporter. For more details see official documentation

In the helm value you can enable the ServiceMonitor via

metrics:
  enabled: true
  serviceMonitor:
    enabled: true

Sidecar 🏎️

This Chart supports the handling for loading flows from configmaps/secrets via the k8s-sidecar

You just need to create a configmap/secret with your node-red flow.json and annotate it with the a label and value defined in the chart sidecar. Default values are: node-red-settings:1.

The k8s-sidecar will then call the node-red api to reload the flows. This will be done via a script. To run this script successfully you need to provide the username and password of your admin user. The admin user needs to have the right to use the node-red API.

The k8s-sidecar can also call the node-red api to install additional node modules (npm packages) before refreshing or importing the flow.json. Specifying a version for a module is supported (s. example below). You need to list your flows required 'NODE_MODULES' in the sidecar.extraNodeModules: e.g.

sidecar:
 extraNodeModules:
    - node-red-contrib-xkeys_setunitid
    - node-red-contrib-microsoft-teams-tasks
    - node-red-contrib-json

To install the node modules successfully, the node red pod needs access to the npmrc.registry to download the declaired modules/packages.

Sidecar v2 Health Checks

Starting with k8s-sidecar v2.x, the sidecar exposes a /healthz endpoint on port 8080 for health monitoring. This chart configures liveness and readiness probes by default:

  • Readiness Probe: Reports ready (HTTP 200) only after the initial synchronization completes
  • Liveness Probe: Monitors Kubernetes API connectivity and watcher subprocess status

You can customize or disable these probes via sidecar.livenessProbe and sidecar.readinessProbe values.

The sidecar.env.skip_init option (v2.1.0+) allows skipping the initial request to the Node-RED API when using watch mode.

Contributing 🤝

Contributing via GitHub

Feel free to join. Checkout the contributing guide

License ⚖️

Apache License, Version 2.0

Source Code

Maintainers

NameEmailUrl
dirien[email protected]https://pulumi.com
Kaktor<felix.k

Deploy node-red with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has node-red on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnode-red is pinned at v0.40.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply