From 3bd2d7569a87c73f76abb0156424a574839fca7b Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Mon, 14 Apr 2025 15:34:07 +0200 Subject: [PATCH] fix(clickhouse): update user config mount paths Properly mount clickhouse user configuration files to the users.d directory with correct paths for each file. Also adds several performance-related settings to the default user profile including query cache and JSON type support. Signed-off-by: rjshrjndrn --- .../clickhouse/templates/statefulset.yaml | 5 ++++- .../databases/charts/clickhouse/values.yaml | 21 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/scripts/helmcharts/databases/charts/clickhouse/templates/statefulset.yaml b/scripts/helmcharts/databases/charts/clickhouse/templates/statefulset.yaml index 110f2a9a4..da6b50be7 100644 --- a/scripts/helmcharts/databases/charts/clickhouse/templates/statefulset.yaml +++ b/scripts/helmcharts/databases/charts/clickhouse/templates/statefulset.yaml @@ -75,8 +75,11 @@ spec: mountPath: /var/lib/clickhouse - name: clickhouse-override-server-config mountPath: /etc/clickhouse-server/config.d + {{- range $filename, $_ := .Values.configOverride.userConfig }} - name: clickhouse-override-user-config - mountPath: /etc/clickhouse-server/config.d + mountPath: /etc/clickhouse-server/users.d/{{$filename}} + subPath: {{$filename}} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/scripts/helmcharts/databases/charts/clickhouse/values.yaml b/scripts/helmcharts/databases/charts/clickhouse/values.yaml index 1930307a7..641d80bab 100644 --- a/scripts/helmcharts/databases/charts/clickhouse/values.yaml +++ b/scripts/helmcharts/databases/charts/clickhouse/values.yaml @@ -86,7 +86,7 @@ storageSize: 100Gi configOverride: serverConfig: - zzoverride.xml: |- + zz-server-override.xml: |- # # # information @@ -110,4 +110,21 @@ configOverride: # value # userConfig: - user-default.xml: |- + zz-user-override.xml: |- + + + + 1 + 1 + 5000 + 900 + ignore + ignore + + + + + default + + +