diff --git a/charts/node-red/Chart.yaml b/charts/node-red/Chart.yaml index 301432b0..0c335c20 100644 --- a/charts/node-red/Chart.yaml +++ b/charts/node-red/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 1.0.6-12 description: Node-RED is low-code programming for event-driven applications name: node-red -version: 3.1.0 +version: 3.2.0 keywords: - nodered - node-red diff --git a/charts/node-red/README.md b/charts/node-red/README.md index 5b1e6064..a457cc6e 100644 --- a/charts/node-red/README.md +++ b/charts/node-red/README.md @@ -36,46 +36,58 @@ The command removes all the Kubernetes components associated with the chart and The following tables lists the configurable parameters of the Node-RED chart and their default values. -| Parameter | Description | Default | -|:---------------------------------- |:----------------------------------------------------------------------- |:------------------------- | -| `image.repository` | node-red image | `nodered/node-red` | -| `image.tag` | node-red image tag | `1.0.6-12-minimal` | -| `image.pullPolicy` | node-red image pull policy | `IfNotPresent` | -| `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | -| `serviceAccountName` | Service account to run the pod as | `` | -| `livenessProbePath` | Default livenessProbe path | `/` | -| `readinessProbePath` | Default readinessProbe path | `/` | -| `flows` | Default flows configuration | `flows.json` | -| `safeMode` | Setting to true starts Node-RED in safe (not running) mode | `false` | -| `enableProjects` | setting to true starts Node-RED with the projects feature enabled | `false` | -| `nodeOptions` | Node.js runtime arguments | `` | -| `extraEnvs` | Extra environment variables which will be appended to the env | `[]` | -| `timezone` | Default timezone | `UTC` | -| `service.type` | Kubernetes service type for the GUI | `ClusterIP` | -| `service.port` | Kubernetes port where the GUI is exposed | `1880` | -| `service.nodePort` | Kubernetes nodePort where the GUI is exposed | `` | -| `service.annotations` | Service annotations for the GUI | `{}` | -| `service.labels` | Custom labels | `{}` | -| `service.loadBalancerIP` | Loadbalance IP for the GUI | `{}` | -| `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None | -| `service.externalTrafficPolicy` | Set the externalTrafficPolicy in the Service to either Cluster or Local | `Cluster` | -| `ingress.enabled` | Enables Ingress | `false` | -| `ingress.annotations` | Ingress annotations | `{}` | -| `ingress.path` | Ingress path | `/` | -| `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` | -| `ingress.tls` | Ingress TLS configuration | `[]` | -| `persistence.enabled` | Use persistent volume to store data | `false` | -| `persistence.size` | Size of persistent volume claim | `5Gi` | -| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` | -| `persistence.storageClass` | Type of persistent volume claim | `-` | -| `persistence.accessModes` | Persistence access modes | `ReadWriteOnce` | -| `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` | -| `resources` | CPU/Memory resource requests/limits | `{}` | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `tolerations` | Toleration labels for pod assignment | `[]` | -| `affinity` | Affinity settings for pod assignment | `{}` | -| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` | -| `deploymentAnnotations` | Key-value pairs to add as deployment annotations | `{}` | +| Parameter | Description | Default | +|:------------------------------------- |:----------------------------------------------------------------------- |:------------------------- | +| `image.repository` | node-red image | `nodered/node-red` | +| `image.tag` | node-red image tag | `1.0.6-12-minimal` | +| `image.pullPolicy` | node-red image pull policy | `IfNotPresent` | +| `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | +| `serviceAccountName` | Service account to run the pod as | `` | +| `probes.liveness.enabled` | Enable/ disable livenessProbe | `true` | +| `probes.liveness.probePath` | Set livenessProbe path | `/` | +| `probes.liveness.initialDelaySeconds` | Set livenessProbe initial delay | 60 | +| `probes.liveness.failureThreshold` | Set livenessProbe failure threshold | 5 | +| `probes.liveness.timeoutSeconds` | Set livenessProbe timeout | 10 | +| `probes.readiness.enabled` | Enable/ disable readinessProbe | `true` | +| `probes.readiness.probePath` | Set readinessProbe path | `/` | +| `probes.readiness.initialDelaySeconds`| Set readinessProbe initial delay | 60 | +| `probes.readiness.failureThreshold` | Set readinessProbe failure threshold | 5 | +| `probes.readiness.timeoutSeconds` | Set readinessProbe timeout | 10 | +| `probes.startup.enabled` | Enable/ disable readinessProbe | `false` | +| `probes.startup.probePath` | Set startupProbe path | `/` | +| `probes.startup.failureThreshold` | Set startupProbe failure threshold | 30 | +| `probes.startup.periodSeconds` | Set startupProbe period | 10 | +| `flows` | Default flows configuration | `flows.json` | +| `safeMode` | Setting to true starts Node-RED in safe (not running) mode | `false` | +| `enableProjects` | setting to true starts Node-RED with the projects feature enabled | `false` | +| `nodeOptions` | Node.js runtime arguments | `` | +| `extraEnvs` | Extra environment variables which will be appended to the env | `[]` | +| `timezone` | Default timezone | `UTC` | +| `service.type` | Kubernetes service type for the GUI | `ClusterIP` | +| `service.port` | Kubernetes port where the GUI is exposed | `1880` | +| `service.nodePort` | Kubernetes nodePort where the GUI is exposed | `` | +| `service.annotations` | Service annotations for the GUI | `{}` | +| `service.labels` | Custom labels | `{}` | +| `service.loadBalancerIP` | Loadbalance IP for the GUI | `{}` | +| `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None | +| `service.externalTrafficPolicy` | Set the externalTrafficPolicy in the Service to either Cluster or Local | `Cluster` | +| `ingress.enabled` | Enables Ingress | `false` | +| `ingress.annotations` | Ingress annotations | `{}` | +| `ingress.path` | Ingress path | `/` | +| `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` | +| `ingress.tls` | Ingress TLS configuration | `[]` | +| `persistence.enabled` | Use persistent volume to store data | `false` | +| `persistence.size` | Size of persistent volume claim | `5Gi` | +| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` | +| `persistence.storageClass` | Type of persistent volume claim | `-` | +| `persistence.accessModes` | Persistence access modes | `ReadWriteOnce` | +| `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` | +| `resources` | CPU/Memory resource requests/limits | `{}` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Toleration labels for pod assignment | `[]` | +| `affinity` | Affinity settings for pod assignment | `{}` | +| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` | +| `deploymentAnnotations` | Key-value pairs to add as deployment annotations | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/charts/node-red/templates/deployment.yaml b/charts/node-red/templates/deployment.yaml index 6e094ab0..d19a25ba 100644 --- a/charts/node-red/templates/deployment.yaml +++ b/charts/node-red/templates/deployment.yaml @@ -44,14 +44,32 @@ spec: - name: http containerPort: 1880 protocol: TCP + {{- if .Values.probes.liveness.enabled }} livenessProbe: httpGet: - path: {{ .Values.livenessProbePath }} + path: {{ .Values.probes.liveness.probePath }} port: http + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + failureThreshold: {{ .Values.probes.liveness.failureThreshold }} + timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }} + {{- end }} + {{- if .Values.probes.readiness.enabled }} readinessProbe: httpGet: - path: {{ .Values.readinessProbePath }} + path: {{ .Values.probes.readiness.probePath }} port: http + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + failureThreshold: {{ .Values.probes.readiness.failureThreshold }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end }} + {{- if .Values.probes.startup.enabled }} + startupProbe: + httpGet: + path: {{ .Values.probes.startup.probePath }} + port: http + failureThreshold: {{ .Values.probes.startup.failureThreshold }} + periodSeconds: {{ .Values.probes.startup.periodSeconds }} + {{- end }} env: - name: FLOWS value: "{{ .Values.flows }}" diff --git a/charts/node-red/values.yaml b/charts/node-red/values.yaml index e98468c8..3f135b92 100644 --- a/charts/node-red/values.yaml +++ b/charts/node-red/values.yaml @@ -15,8 +15,31 @@ fullnameOverride: "" serviceAccountName: "" -livenessProbePath: / -readinessProbePath: / +# Probes configuration +# ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes +probes: + liveness: + # Indicates whether the container is running. If the liveness probe fails, the kubelet kills the container + # and the container is subjected to its restart policy. + enabled: true + probePath: / + initialDelaySeconds: 60 + failureThreshold: 5 + timeoutSeconds: 10 + readiness: + # Indicates whether the container is ready to respond to requests. + enabled: true + probePath: / + initialDelaySeconds: 60 + failureThreshold: 5 + timeoutSeconds: 10 + startup: + # Indicates whether the application within the container is started. + # All other probes are disabled if a startup probe is provided, until it succeeds. + enabled: false + probePath: / + failureThreshold: 30 + periodSeconds: 10 flows: "flows.json" safeMode: "false"