From 78a4c0bbf2f9fbffb6b77ea5555584ad1b530ec3 Mon Sep 17 00:00:00 2001 From: Rafal Korepta Date: Tue, 17 Dec 2024 18:08:29 +0100 Subject: [PATCH] Change tiered storage cache default to `none` Set default value for tiered storage cache to `none` which will defer tiered storage cache path to Redpanda process. Previously the `emptyDir` volume could fill Kubernetes VM quickly and tip over such K8S Node. Then user would need to restart Pod to clean the content of the `emptyDir` volume. --- charts/redpanda/README.md | 2 +- .../testdata/template-cases.golden.txtar | 28 ------------------- charts/redpanda/values.yaml | 2 +- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/charts/redpanda/README.md b/charts/redpanda/README.md index 8056a9df5d..6d4b027c57 100644 --- a/charts/redpanda/README.md +++ b/charts/redpanda/README.md @@ -1034,7 +1034,7 @@ Persistence settings. For details, see the [storage documentation](https://docs. **Default:** ``` -{"hostPath":"","persistentVolume":{"annotations":{},"enabled":true,"labels":{},"nameOverwrite":"","size":"20Gi","storageClass":""},"tiered":{"config":{"cloud_storage_cache_size":5368709120,"cloud_storage_enable_remote_read":true,"cloud_storage_enable_remote_write":true,"cloud_storage_enabled":false},"credentialsSecretRef":{"accessKey":{"configurationKey":"cloud_storage_access_key"},"secretKey":{"configurationKey":"cloud_storage_secret_key"}},"hostPath":"","mountType":"emptyDir","persistentVolume":{"annotations":{},"labels":{},"storageClass":""}}} +{"hostPath":"","persistentVolume":{"annotations":{},"enabled":true,"labels":{},"nameOverwrite":"","size":"20Gi","storageClass":""},"tiered":{"config":{"cloud_storage_cache_size":5368709120,"cloud_storage_enable_remote_read":true,"cloud_storage_enable_remote_write":true,"cloud_storage_enabled":false},"credentialsSecretRef":{"accessKey":{"configurationKey":"cloud_storage_access_key"},"secretKey":{"configurationKey":"cloud_storage_secret_key"}},"hostPath":"","mountType":"none","persistentVolume":{"annotations":{},"labels":{},"storageClass":""}}} ``` ### [storage.hostPath](https://artifacthub.io/packages/helm/redpanda-data/redpanda?modal=values&path=storage.hostPath) diff --git a/charts/redpanda/testdata/template-cases.golden.txtar b/charts/redpanda/testdata/template-cases.golden.txtar index 5c9ca24e8f..2ce42c0664 100644 --- a/charts/redpanda/testdata/template-cases.golden.txtar +++ b/charts/redpanda/testdata/template-cases.golden.txtar @@ -25980,8 +25980,6 @@ spec: name: lifecycle-scripts - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - args: - -c - trap "exit 0" TERM; exec /etc/secrets/config-watcher/scripts/sasl-user.sh @@ -26040,8 +26038,6 @@ spec: name: redpanda-external-cert - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - command: - /bin/bash - -c @@ -26156,9 +26152,6 @@ spec: - name: datadir persistentVolumeClaim: claimName: datadir - - emptyDir: - sizeLimit: 5368709120 - name: tiered-storage-dir updateStrategy: type: RollingUpdate volumeClaimTemplates: @@ -27438,8 +27431,6 @@ spec: name: lifecycle-scripts - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - args: - -c - trap "exit 0" TERM; exec /etc/secrets/config-watcher/scripts/sasl-user.sh @@ -27498,8 +27489,6 @@ spec: name: redpanda-external-cert - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - command: - /bin/bash - -c @@ -27614,9 +27603,6 @@ spec: - name: datadir persistentVolumeClaim: claimName: datadir - - emptyDir: - sizeLimit: 5368709120 - name: tiered-storage-dir updateStrategy: type: RollingUpdate volumeClaimTemplates: @@ -28894,8 +28880,6 @@ spec: name: lifecycle-scripts - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - args: - -c - trap "exit 0" TERM; exec /etc/secrets/config-watcher/scripts/sasl-user.sh @@ -28954,8 +28938,6 @@ spec: name: redpanda-external-cert - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - command: - /bin/bash - -c @@ -29070,9 +29052,6 @@ spec: - name: datadir persistentVolumeClaim: claimName: datadir - - emptyDir: - sizeLimit: 5368709120 - name: tiered-storage-dir updateStrategy: type: RollingUpdate volumeClaimTemplates: @@ -30297,8 +30276,6 @@ spec: name: lifecycle-scripts - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - args: - -c - trap "exit 0" TERM; exec /etc/secrets/config-watcher/scripts/sasl-user.sh @@ -30357,8 +30334,6 @@ spec: name: redpanda-external-cert - mountPath: /var/lib/redpanda/data name: datadir - - mountPath: /var/lib/redpanda/data/cloud_storage_cache - name: tiered-storage-dir - command: - /bin/bash - -c @@ -30473,9 +30448,6 @@ spec: - name: datadir persistentVolumeClaim: claimName: datadir - - emptyDir: - sizeLimit: 5368709120 - name: tiered-storage-dir updateStrategy: type: RollingUpdate volumeClaimTemplates: diff --git a/charts/redpanda/values.yaml b/charts/redpanda/values.yaml index 00192519b8..e49097f307 100644 --- a/charts/redpanda/values.yaml +++ b/charts/redpanda/values.yaml @@ -479,7 +479,7 @@ storage: # - hostPath: will allow you to chose a path on the Node the pod is running on # - emptyDir: will mount a fresh empty directory every time the pod starts # - persistentVolume: creates and mounts a PersistentVolumeClaim - mountType: emptyDir + mountType: none # For the maximum size of the disk cache, see `tieredConfig.cloud_storage_cache_size`. #