FlowFuse / FlowFuse/driver-k8s

Custom k8s environment variables for Node-RED applications

Open
#166 2 comments 0 reactions 0 assignees View on GitHub
customer request needs-triage size:M type:feature
Dominant language
JavaScript
Stars
2
Forks
3
Avg merge
1d 4h
Merged PRs (30d)
10

Description

### Description

Presently, Node-RED apps in k8s have a set of environment variables that cannot be added to. This makes setting custom environment variables impossible without using k8s webhooks.

For example, in our use case, we want to be able to set a `HOST_IP` environment variable that makes use of k8s `fieldRef` to get the IP address of the node that the pod is running on. This is because we have a node-level Open Telemetry collector running on port `4317` accessible via the node's IP address. By using this functionality, we would always get the right IP address regardless of the node that a Node-RED app is running on.

An example of additional environment variables for a container's `env` setting is given below:

```
- name: OTEL_SERVICE_NAME
value:
- name: HOST_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
- name: OTEL_EXPORTER_ENDPOINT
value: http://$(HOST_IP):4317
```

### Requested By

- Customer name and/or link to HubSpot contact
- https://app-eu1.hubspot.com/contacts/26586079/company/7761278700

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.