From 69d1e0ee124cee913ecf2096b3a1f6480010dea3 Mon Sep 17 00:00:00 2001 From: sophon Date: Sat, 11 Nov 2023 00:26:58 +0800 Subject: [PATCH] chore: support monitor for clickhouse --- addons/clickhouse/configs/00_default_overrides.xml.tpl | 2 -- addons/clickhouse/templates/clusterdefinition.yaml | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/clickhouse/configs/00_default_overrides.xml.tpl b/addons/clickhouse/configs/00_default_overrides.xml.tpl index 4395cd1c2..aca356ce3 100644 --- a/addons/clickhouse/configs/00_default_overrides.xml.tpl +++ b/addons/clickhouse/configs/00_default_overrides.xml.tpl @@ -45,7 +45,6 @@ {{- end }} {{- end }} -{{- if $.component.monitor.enable }} /metrics @@ -54,5 +53,4 @@ true true -{{- end }} diff --git a/addons/clickhouse/templates/clusterdefinition.yaml b/addons/clickhouse/templates/clusterdefinition.yaml index b5821e725..ff2ed9a79 100644 --- a/addons/clickhouse/templates/clusterdefinition.yaml +++ b/addons/clickhouse/templates/clusterdefinition.yaml @@ -105,6 +105,8 @@ spec: value: "default" - name: CLICKHOUSE_SHARD_ID value: "$(KB_COMP_NAME)" + - name: SERVICE_PORT + value: "$(CLICKHOUSE_METRICS_PORT)" - name: CLICKHOUSE_REPLICA_ID valueFrom: fieldRef: @@ -202,6 +204,8 @@ spec: value: "9181" - name: CLICKHOUSE_METRICS_PORT value: "8001" + - name: SERVICE_PORT + value: "$(CLICKHOUSE_METRICS_PORT)" ports: - name: tcp containerPort: 2181 @@ -346,6 +350,8 @@ spec: value: "$(KB_POD_NAME)" - name: POD_NAMESPACE value: "$(KB_NAMESPACE)" + - name: SERVICE_PORT + value: "$(ZOO_PROMETHEUS_METRICS_PORT_NUMBER)" # TODO: using componentDefRef to inject zookeeper or keeper env ports: - name: client