Skip to content

Commit f426693

Browse files
fix(clickhouse): remove duplicate template key and use correct cluster domain variable
- Removed the duplicate `template` mapping key in backup-cronjob.yaml that caused a YAML unmarshal error ("mapping key 'template' already defined") when deploying ClickHouse with backup enabled. This is the same class of bug as cozystack#2293 but in the ClickHouse chart. - Replaced `.Values.clusterDomain` (which does not exist in clickhouse values.yaml) with the correct `(index .Values._cluster "cluster-domain") | default "cozy.local"` in clickhouse.yaml, matching the pattern used everywhere else in the codebase. The wrong variable caused ClickHouse Keeper ZooKeeper node hostnames to have an empty cluster domain suffix, preventing ClickHouse from connecting to Keeper. Fixes cozystack#2333 Signed-off-by: Asish Kumar <[email protected]>
1 parent 38624b7 commit f426693

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎packages/apps/clickhouse/templates/backup-cronjob.yaml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ spec:
1313
jobTemplate:
1414
spec:
1515
backoffLimit: 2
16-
template:
17-
spec:
18-
restartPolicy: OnFailure
1916
template:
2017
metadata:
2118
annotations:

‎packages/apps/clickhouse/templates/clickhouse.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ spec:
9696
{{- $replicas := int .Values.clickhouseKeeper.replicas }}
9797
{{- $release := .Release.Name }}
9898
{{- $namespace := .Release.Namespace }}
99-
{{- $clusterDomain := .Values.clusterDomain }}
99+
{{- $clusterDomain := (index .Values._cluster "cluster-domain") | default "cozy.local" }}
100100
{{- range $i := until $replicas }}
101101
- host: "chk-{{ $release }}-keeper-cluster1-0-{{ $i }}.{{ $namespace }}.svc.{{ $clusterDomain }}"
102102
port: 2181

0 commit comments

Comments
 (0)