@flowfuse/driver-kubernetes 2.0.2-0cf4885-202401261504.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +2 -0
- package/kubernetes.js +9 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ driver:
|
|
|
20
20
|
certManagerIssuer: lets-encrypt
|
|
21
21
|
k8sDelay: 1000
|
|
22
22
|
k8sRetries: 10
|
|
23
|
+
logPassthrough: true
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
- `registry` is the Docker Registry to load Stack Containers from
|
|
@@ -32,6 +33,7 @@ AWS EKS specific annotation for ALB Ingress.
|
|
|
32
33
|
- `certManagerIssuer` name of the ClusterIssuer to use to create HTTPS certs for instances (default not set)
|
|
33
34
|
- `k8sRetries` how many times to retry actions against the K8s API
|
|
34
35
|
- `k8sDelay` how long to wait (in ms) between retries to the K8s API
|
|
36
|
+
- `logPassthrough` Have Node-RED logs printed in JSON format to container stdout (default false)
|
|
35
37
|
|
|
36
38
|
Expects to pick up K8s credentials from the environment
|
|
37
39
|
|
package/kubernetes.js
CHANGED
|
@@ -282,6 +282,10 @@ const createDeployment = async (project, options) => {
|
|
|
282
282
|
localPod.spec.containers[0].env.push({ name: 'FORGE_NR_SECRET', value: credentialSecret })
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
if (this._logPassthrough) {
|
|
286
|
+
localPod.spec.containers[0].env.push({ name: 'FORGE_LOG_PASSTHROUGH', value: 'true' })
|
|
287
|
+
}
|
|
288
|
+
|
|
285
289
|
if (this._app.config.driver.options.projectSelector) {
|
|
286
290
|
localPod.spec.nodeSelector = this._app.config.driver.options.projectSelector
|
|
287
291
|
}
|
|
@@ -602,10 +606,11 @@ module.exports = {
|
|
|
602
606
|
this._projects = {}
|
|
603
607
|
this._options = options
|
|
604
608
|
|
|
605
|
-
this._namespace = this._app.config.driver.options
|
|
606
|
-
this._k8sDelay = this._app.config.driver.options
|
|
607
|
-
this._k8sRetries = this._app.config.driver.options
|
|
608
|
-
this._certManagerIssuer = this._app.config.driver.options
|
|
609
|
+
this._namespace = this._app.config.driver.options?.projectNamespace || 'flowforge'
|
|
610
|
+
this._k8sDelay = this._app.config.driver.options?.k8sDelay || 1000
|
|
611
|
+
this._k8sRetries = this._app.config.driver.options?.k8sRetries || 10
|
|
612
|
+
this._certManagerIssuer = this._app.config.driver.options?.certManagerIssuer
|
|
613
|
+
this._logPassthrough = this._app.config.driver.options?.logPassthrough || false
|
|
609
614
|
|
|
610
615
|
const kc = new k8s.KubeConfig()
|
|
611
616
|
|