github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/clickhouse/configs/ch-keeper_00_default_overrides.xml.tpl (about) 1 {{- $clusterName := $.cluster.metadata.name }} 2 {{- $namespace := $.cluster.metadata.namespace }} 3 <clickhouse> 4 <listen_host>0.0.0.0</listen_host> 5 <keeper_server> 6 <tcp_port from_env="CLICKHOUSE_KEEPER_TCP_PORT"></tcp_port> 7 <server_id>1</server_id> 8 <log_storage_path>/var/lib/clickhouse/coordination/log</log_storage_path> 9 <snapshot_storage_path>/var/lib/clickhouse/coordination/snapshots</snapshot_storage_path> 10 <coordination_settings> 11 <operation_timeout_ms>10000</operation_timeout_ms> 12 <session_timeout_ms>30000</session_timeout_ms> 13 <raft_logs_level>warning</raft_logs_level> 14 </coordination_settings> 15 <raft_configuration> 16 {{- $replicas := $.component.replicas | int }} 17 {{- range $i, $e := until $replicas }} 18 <server> 19 <id>{{ $i | int | add1 }}</id> 20 <hostname>{{ $clusterName }}-{{ $.component.name }}-{{ $i }}.{{ $clusterName }}-{{ $.component.name }}-headless.{{ $namespace }}.svc.{{- $.clusterDomain }}</hostname> 21 <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port> 22 </server> 23 {{- end }} 24 </raft_configuration> 25 </keeper_server> 26 {{- if $.component.monitor.enable }} 27 <!-- Prometheus metrics --> 28 <prometheus> 29 <endpoint>/metrics</endpoint> 30 <port from_env="CLICKHOUSE_METRICS_PORT"></port> 31 <metrics>true</metrics> 32 <events>true</events> 33 <asynchronous_metrics>true</asynchronous_metrics> 34 </prometheus> 35 {{- end }} 36 </clickhouse>