From bf3dfe563f948fb3664aecca7a486689e7957e67 Mon Sep 17 00:00:00 2001 From: Aleksandr Aleksandrov Date: Sat, 18 May 2024 23:42:41 +0300 Subject: [PATCH] feat: ability to override default clickhouse config Signed-off-by: Aleksandr Aleksandrov --- clickhouse/templates/configmap-config.yaml | 13 +++++++++---- clickhouse/values.yaml | 10 ++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/clickhouse/templates/configmap-config.yaml b/clickhouse/templates/configmap-config.yaml index 883ff553f..a8e07ca00 100755 --- a/clickhouse/templates/configmap-config.yaml +++ b/clickhouse/templates/configmap-config.yaml @@ -73,7 +73,7 @@ data: {{- end }} {{- end }} - + {{- end }} @@ -162,11 +162,16 @@ data: {{- if .Values.clickhouse.configmap.merge_tree.enabled }} - {{ .Values.clickhouse.configmap.merge_tree.parts_to_delay_insert }} - {{ .Values.clickhouse.configmap.merge_tree.parts_to_throw_insert }} - {{ .Values.clickhouse.configmap.merge_tree.max_part_loading_threads }} + {{ .Values.clickhouse.configmap.merge_tree.parts_to_delay_insert }} + {{ .Values.clickhouse.configmap.merge_tree.parts_to_throw_insert }} + {{ .Values.clickhouse.configmap.merge_tree.max_part_loading_threads }} {{ .Values.clickhouse.configmap.merge_tree.max_suspicious_broken_parts }} {{- end }} +{{- if .Values.clickhouse.configmap.configOverride }} + override.xml: |- + + {{- .Values.clickhouse.configmap.configOverride | nindent 4 }} +{{- end }} {{- end }} diff --git a/clickhouse/values.yaml b/clickhouse/values.yaml index 15fe03216..0133fe7b7 100755 --- a/clickhouse/values.yaml +++ b/clickhouse/values.yaml @@ -375,6 +375,16 @@ clickhouse: max_part_loading_threads: auto # If the number of broken parts in a single partition exceeds the max_suspicious_broken_parts value, automatic deletion is denied. max_suspicious_broken_parts: 100 + ## + ## Allows to override default Clickhouse config via override.xml + ## E.g. + ## configOverride: + ## + ## + ## event_date + INTERVAL 1 DAY DELETE + ## + ## + configOverride: "" ## ## Web interface for ClickHouse in the Tabix project.