feat(clickhouse): add config override capability
Adds support for overriding ClickHouse server configurations by: - Creating a new ConfigMap to store custom XML configurations - Mounting the ConfigMap to ClickHouse pods under /etc/clickhouse-server/config.d - Adding configOverride field to values.yaml with examples Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
553e3f6045
commit
1b851a8b72
3 changed files with 42 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: clickhouse-override
|
||||
data:
|
||||
{{- range $filename, $content := .Values.configOverride }}
|
||||
{{ $filename }}: |-
|
||||
{{ $content | indent 4 }}
|
||||
{{- end }}
|
||||
|
||||
|
|
@ -73,6 +73,8 @@ spec:
|
|||
volumeMounts:
|
||||
- name: default-chi-openreplay-clickhouse-replicated-0-0-0
|
||||
mountPath: /var/lib/clickhouse
|
||||
- name: clickhouse-override-config
|
||||
mountPath: /etc/clickhouse-server/config.d
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
|
|
@ -87,6 +89,11 @@ spec:
|
|||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: clickhouse-override-config
|
||||
configMap:
|
||||
name: clickhouse-override
|
||||
optional: true
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: default-chi-openreplay-clickhouse-replicated-0-0-0
|
||||
|
|
|
|||
|
|
@ -83,3 +83,28 @@ tolerations: []
|
|||
|
||||
affinity: {}
|
||||
storageSize: 100Gi
|
||||
|
||||
configOverride:
|
||||
zzoverride.xml: |-
|
||||
<clickhouse>
|
||||
<logger>
|
||||
<level>information</level>
|
||||
<console>true</console>
|
||||
<log remove="remove"></log>
|
||||
<errorlog remove="remove"></errorlog>
|
||||
</logger>
|
||||
<listen_host>0.0.0.0</listen_host>
|
||||
<keep_alive_timeout>100</keep_alive_timeout>
|
||||
<concurrent_threads_soft_limit_num>64</concurrent_threads_soft_limit_num>
|
||||
<concurrent_threads_soft_limit_ratio_to_cores>2</concurrent_threads_soft_limit_ratio_to_cores>
|
||||
<concurrent_threads_scheduler>fair_round_robin</concurrent_threads_scheduler>
|
||||
<max_server_memory_usage>102400000000</max_server_memory_usage>
|
||||
<max_thread_pool_size>10000</max_thread_pool_size>
|
||||
<max_server_memory_usage_to_ram_ratio>0.8</max_server_memory_usage_to_ram_ratio>
|
||||
<uncompressed_cache_size remove="remove"></uncompressed_cache_size>
|
||||
<mmap_cache_size>26214</mmap_cache_size>
|
||||
</clickhouse>
|
||||
# another-config.xml: |-
|
||||
# <clickhouse>
|
||||
# <another_setting>value</another_setting>
|
||||
# </clickhouse>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue