From 2937f2c457c7b85206135ef070ba6f4152296b33 Mon Sep 17 00:00:00 2001 From: Rafal Korepta Date: Wed, 23 Nov 2022 19:00:03 +0100 Subject: [PATCH] Set storage_min_free_bytes in atleast 22.2.x The following command was able to create cluster that was in crash loop backoff ``` helm install redpanda ./charts/redpanda \ --namespace redpanda \ --create-namespace --set image.tag="v22.1.10" ``` ``` INFO 2022-11-23 17:40:47,400 [shard 0] redpanda::main - application.cc:154 - File handle limit: 1048576/1048576 INFO 2022-11-23 17:40:47,404 [shard 0] cluster - config_manager.cc:423 - Can't load config cache: std::__1::__fs::filesystem::filesystem_error (error system:2, filesystem error: open failed: No such file or directory [/var/lib/redpanda/data/config_cache.yaml]) INFO 2022-11-23 17:40:47,405 [shard 0] redpanda::main - application.cc:205 - Failure during startup: std::invalid_argument (Unknown property storage_min_free_bytes) ``` The storage_min_free_bytes was introduced in 22.2.1 as per [release notes](https://github.com/redpanda-data/redpanda/releases/tag/v22.2.1) https://github.com/redpanda-data/redpanda/pull/4803 --- charts/redpanda/Chart.yaml | 2 +- charts/redpanda/templates/configmap.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/redpanda/Chart.yaml b/charts/redpanda/Chart.yaml index 2e762429b6..4c082f55f1 100644 --- a/charts/redpanda/Chart.yaml +++ b/charts/redpanda/Chart.yaml @@ -23,7 +23,7 @@ type: application # The chart version and the app version are not the same and will not track # together. The chart version is a semver representation of changes to this # chart. -version: 2.3.3 +version: 2.3.4 # The app version is the default version of Redpanda to install. appVersion: v22.3.3 # kubeVersion must be suffixed with "-0" to be able to match cloud providers diff --git a/charts/redpanda/templates/configmap.yaml b/charts/redpanda/templates/configmap.yaml index da80b96a0a..e5fb328a0c 100644 --- a/charts/redpanda/templates/configmap.yaml +++ b/charts/redpanda/templates/configmap.yaml @@ -49,7 +49,7 @@ data: {{- with (dig "tunable" dict .Values.config) }} {{- toYaml . | nindent 4 }} {{- end }} - {{- if not (hasKey .Values.config.cluster "storage_min_free_bytes") }} + {{- if and (not (hasKey .Values.config.cluster "storage_min_free_bytes")) ((include "redpanda-atleast-22-2-0" . | fromJson).bool) }} storage_min_free_bytes: {{ include "storage-min-free-bytes" . }} {{- end }} {{- end }}