diff --git a/charts/node-red/Chart.yaml b/charts/node-red/Chart.yaml index b317a7bd..da541f2b 100644 --- a/charts/node-red/Chart.yaml +++ b/charts/node-red/Chart.yaml @@ -9,7 +9,7 @@ icon: https://nodered.org/about/resources/media/node-red-icon-2.png type: application -version: 0.22.8 +version: 0.23.0 appVersion: 3.0.2 keywords: @@ -29,7 +29,7 @@ maintainers: annotations: artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/changes: | - - update quay.io/kiwigrid/k8s-sidecar to 1.23.1 + - add "helm.sh/resource-policy" annotation to prevent helm from deleting the PVC artifacthub.io/images: | - name: node-red image: docker.io/nodered/node-red:3.0.2 diff --git a/charts/node-red/README.md b/charts/node-red/README.md index 3dfdb1d3..7fec0c59 100644 --- a/charts/node-red/README.md +++ b/charts/node-red/README.md @@ -1,6 +1,6 @@ # node-red ⚙ -![Version: 0.22.8](https://img.shields.io/badge/Version-0.22.8-informational?style=for-the-badge) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) ![AppVersion: 3.0.2](https://img.shields.io/badge/AppVersion-3.0.2-informational?style=for-the-badge) +![Version: 0.23.0](https://img.shields.io/badge/Version-0.23.0-informational?style=for-the-badge) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) ![AppVersion: 3.0.2](https://img.shields.io/badge/AppVersion-3.0.2-informational?style=for-the-badge) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/node-red&style=for-the-badge)](https://artifacthub.io/packages/search?repo=node-red) [![SIT](https://img.shields.io/badge/SIT-awesome-blueviolet.svg?style=for-the-badge)](https://jobs.schwarz) @@ -16,7 +16,7 @@ A Helm chart for Node-Red, a low-code programming for event-driven applications To install the chart using the OCI artifact, run: ```bash -helm install node-red oci://ghcr.io/schwarzit/charts/node-red --version 0.22.8 +helm install node-red oci://ghcr.io/schwarzit/charts/node-red --version 0.23.0 ``` ## Usage @@ -32,7 +32,7 @@ helm repo update To install the chart with the release name node-red run: ```bash -helm install node-red node-red/node-red --version 0.22.8 +helm install node-red node-red/node-red --version 0.23.0 ``` After a few seconds, node-red should be running. @@ -98,6 +98,7 @@ The command removes all the Kubernetes components associated with the chart and | npmrc.registry | string | `"https://registry.npmjs.org"` | Configuration to use any compatible registry | | persistence.accessMode | string | `"ReadWriteOnce"` | Persistence access mode | | persistence.enabled | bool | `false` | Use persistent volume to store data | +| persistence.keepPVC | bool | `false` | ## Keep a created Persistent volume claim when uninstalling the helm chart (default: false) | | persistence.size | string | `"5Gi"` | Size of persistent volume claim | | podAnnotations | object | `{}` | Pod annotations | | podLabels | object | `{}` | Labels to add to the node-red pod. default: {} | diff --git a/charts/node-red/templates/pvc.yaml b/charts/node-red/templates/pvc.yaml index cc0e6586..9f0274a4 100644 --- a/charts/node-red/templates/pvc.yaml +++ b/charts/node-red/templates/pvc.yaml @@ -8,6 +8,10 @@ metadata: helm.sh/chart: {{ include "node-red.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} + {{- if .Values.persistence.keepPVC }} + annotations: + helm.sh/resource-policy: keep + {{- end }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} @@ -21,4 +25,4 @@ spec: storageClassName: "{{ .Values.persistence.storageClass }}" {{- end }} {{- end }} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/charts/node-red/values.yaml b/charts/node-red/values.yaml index 1e018031..2229e4d3 100644 --- a/charts/node-red/values.yaml +++ b/charts/node-red/values.yaml @@ -33,7 +33,7 @@ npmrc: # Custom npmrc config # -- node-red env, see more environment variables in the [node-red documentation](https://nodered.org/docs/getting-started/docker) -env: [] +env: [ ] # Possible Values: # TZ: # NODE_OPTIONS: @@ -43,7 +43,7 @@ env: [] # example: # env: # - name: "NODE_RED_ENABLE_SAFE_MODE" - # value: "" +# value: "" serviceAccount: # Specifies whether a service account should be created @@ -51,17 +51,17 @@ serviceAccount: create: true # Annotations to add to the service account # -- Additional ServiceAccount annotations - annotations: {} + annotations: { } # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template # -- Service account name to use, when empty will be set to created account if name: "" # -- Pod annotations -podAnnotations: {} +podAnnotations: { } # -- Deployment annotations -deploymentAnnotations: {} +deploymentAnnotations: { } # -- Pod Security Context see [values.yaml](values.yaml) podSecurityContext: @@ -99,21 +99,21 @@ metrics: # -- Enable a prometheus ServiceMonitor enabled: false # -- Prometheus basicAuth configuration for ServiceMonitor endpoint - basicAuth: {} + basicAuth: { } # -- Prometheus ServiceMonitor interval interval: 30s # -- Prometheus [RelabelConfigs] to apply to samples before scraping - relabelings: [] + relabelings: [ ] # -- Prometheus [MetricRelabelConfigs] to apply to samples before ingestion - metricRelabelings: [] + metricRelabelings: [ ] # -- Prometheus ServiceMonitor selector - selector: {} + selector: { } # prometheus: kube-prometheus # -- Prometheus ServiceMonitor namespace namespace: "" # "monitoring" # -- Prometheus ServiceMonitor labels - additionalLabels: {} + additionalLabels: { } persistence: # -- Use persistent volume to store data @@ -136,9 +136,11 @@ persistence: accessMode: ReadWriteOnce # -- Size of persistent volume claim size: 5Gi + # -- ## Keep a created Persistent volume claim when uninstalling the helm chart (default: false) + keepPVC: false # -- containers which are run before the app containers are started -initContainers: [] +initContainers: [ ] ingress: # -- Enable an ingress resource for the server @@ -146,19 +148,19 @@ ingress: # -- Defines which ingress controller will implement the resource className: "" # -- Additional ingress annotations - annotations: {} + annotations: { } # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + # kubernetes.io/tls-acme: "true" hosts: # Ingress accepted hostnames - host: chart-example.local paths: - # -- The base path + # -- The base path - path: / # -- Ingress type of path pathType: ImplementationSpecific # -- Ingress TLS configuration - tls: [] + tls: [ ] # -- Secret name for the certificate # - secretName: chart-example-tls # -- Hostnames for the Ingress @@ -175,7 +177,7 @@ ingress: # -- Kind of the Issuer # kind: ClusterIssuer # -- Name of the Issuer - # name: "test" + # name: "test" # -- CPU/Memory resource requests/limits resources: @@ -191,13 +193,13 @@ resources: memory: 128Mi # -- Node selector -nodeSelector: {} +nodeSelector: { } # -- Toleration labels for pod assignment -tolerations: [] +tolerations: [ ] # -- The affinity constraint -affinity: {} +affinity: { } # -- Extra Volumes for the pod extraVolumes: @@ -214,7 +216,7 @@ extraVolumeMounts: # mountPath: /test # -- You can configure node-red using a settings file. default: {} -settings: {} +settings: { } # Details about the content of the settings.js, you can lookup under # https://nodered.org/docs/user-guide/runtime/settings-file # The ConfigMap should already exist and the key must be named `settings.js` @@ -222,10 +224,10 @@ settings: {} # configMapName: settings-config # -- Labels to add to the node-red pod. default: {} -podLabels: {} +podLabels: { } # -- You can configure extra sidecars containers to run alongside the node-red pod. default: [] -extraSidecars: [] +extraSidecars: [ ] # - name: sidecar-example # image: busybox # command: ["/bin/sh", "-c", "echo hello from sidecar"] @@ -251,17 +253,17 @@ sidecar: # -- Password as key value pair password: "" # -- Password from existing secret - passwordFromExistingSecret: {} + passwordFromExistingSecret: { } # -- Name of the secret that contains the password # name: node-red-api-admin-password # -- Key of the secret that contains the password # key: password # -- Extra Environments for the sidecar - extraEnv: [] + extraEnv: [ ] # -- Resources for the sidecar - resources: {} + resources: { } # -- Security context for the sidecar - securityContext: {} + securityContext: { } # Image for the sidecar image: # -- The image registry to pull the sidecar from @@ -273,4 +275,4 @@ sidecar: # -- The image pull policy, default: `IfNotPresent` pullPolicy: IfNotPresent # -- The extra volume mounts for the sidecar - volumeMounts: [] + volumeMounts: [ ]