From 7065f3cd6ba1e8a9dcfe242ebfefeb7317f92375 Mon Sep 17 00:00:00 2001 From: Njegos Date: Fri, 13 Jun 2025 10:04:07 +0200 Subject: [PATCH] feat: conditionally create StorageClass based on storage.enabled flag --- helm/charts/besu-node/templates/node-storage.yaml | 3 ++- helm/charts/besu-node/values.yaml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/helm/charts/besu-node/templates/node-storage.yaml b/helm/charts/besu-node/templates/node-storage.yaml index 356146bb..daea6714 100644 --- a/helm/charts/besu-node/templates/node-storage.yaml +++ b/helm/charts/besu-node/templates/node-storage.yaml @@ -1,3 +1,4 @@ +{{- if .Values.storage.enabled }} {{- if eq .Values.cluster.provider "azure" }} --- apiVersion: storage.k8s.io/v1 @@ -68,4 +69,4 @@ spec: path: "/tmp/{{ include "besu-node.fullname" . }}" {{- end }} - +{{- end }} \ No newline at end of file diff --git a/helm/charts/besu-node/values.yaml b/helm/charts/besu-node/values.yaml index afdd7cba..21f4487c 100644 --- a/helm/charts/besu-node/values.yaml +++ b/helm/charts/besu-node/values.yaml @@ -31,6 +31,8 @@ azure: subscriptionId: azure-subscriptionId storage: + enabled: + true sizeLimit: "20Gi" pvcSizeLimit: "20Gi" # NOTE: when you set this to Retain, the volume WILL persist after the chart is delete and you need to manually delete it