Skip to content

Commit

Permalink
feat: ability to override default clickhouse config
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Aleksandrov <alex.mirenki@gmail.com>
  • Loading branch information
alexandrovas committed May 21, 2024
1 parent 672032b commit bf3dfe5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
13 changes: 9 additions & 4 deletions clickhouse/templates/configmap-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ data:
{{- end }}
</replica>
{{- end }}
</shard>
</shard>
{{- end }}
</{{ include "clickhouse.fullname" . }}>
</remote_servers>
Expand Down Expand Up @@ -162,11 +162,16 @@ data:
{{- if .Values.clickhouse.configmap.merge_tree.enabled }}
<merge_tree>
<parts_to_delay_insert>{{ .Values.clickhouse.configmap.merge_tree.parts_to_delay_insert }}</parts_to_delay_insert>
<parts_to_throw_insert>{{ .Values.clickhouse.configmap.merge_tree.parts_to_throw_insert }}</parts_to_throw_insert>
<max_part_loading_threads>{{ .Values.clickhouse.configmap.merge_tree.max_part_loading_threads }}</max_part_loading_threads>
<parts_to_delay_insert>{{ .Values.clickhouse.configmap.merge_tree.parts_to_delay_insert }}</parts_to_delay_insert>
<parts_to_throw_insert>{{ .Values.clickhouse.configmap.merge_tree.parts_to_throw_insert }}</parts_to_throw_insert>
<max_part_loading_threads>{{ .Values.clickhouse.configmap.merge_tree.max_part_loading_threads }}</max_part_loading_threads>
<max_suspicious_broken_parts>{{ .Values.clickhouse.configmap.merge_tree.max_suspicious_broken_parts }}</max_suspicious_broken_parts>
</merge_tree>
{{- end }}
</yandex>
{{- if .Values.clickhouse.configmap.configOverride }}
override.xml: |-
<?xml version="1.0"?>
{{- .Values.clickhouse.configmap.configOverride | nindent 4 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions clickhouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
## <yandex>
## <query_log>
## <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
## </query_log>
## </yandex>
configOverride: ""

##
## Web interface for ClickHouse in the Tabix project.
Expand Down

0 comments on commit bf3dfe5

Please sign in to comment.