From d42531bb7a2a695103d9cb91c8bab8123ff8a121 Mon Sep 17 00:00:00 2001 From: zhangtao <111836083+sophon-zt@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:44:48 +0800 Subject: [PATCH] chore: add metrics collect-related annotations for redis (#996) (cherry picked from commit 9de9feab0625f0bd2bbafb1d88cbd5b369018415) --- addons/redis/templates/componentdefinition-redis-cluster.yaml | 4 ++++ addons/redis/templates/componentdefinition-redis.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/addons/redis/templates/componentdefinition-redis-cluster.yaml b/addons/redis/templates/componentdefinition-redis-cluster.yaml index 18ee39fde..68d3e74ea 100644 --- a/addons/redis/templates/componentdefinition-redis-cluster.yaml +++ b/addons/redis/templates/componentdefinition-redis-cluster.yaml @@ -40,6 +40,10 @@ spec: - name: {{ $name }} filePathPattern: {{ $pattern }} {{- end }} + exporter: + containerName: metrics + scrapePath: /metrics + scrapePort: http-metrics configs: - name: redis-cluster-config templateRef: redis-cluster7-config-template diff --git a/addons/redis/templates/componentdefinition-redis.yaml b/addons/redis/templates/componentdefinition-redis.yaml index 22a722a3b..70bd7ffd9 100644 --- a/addons/redis/templates/componentdefinition-redis.yaml +++ b/addons/redis/templates/componentdefinition-redis.yaml @@ -45,6 +45,10 @@ spec: - name: {{ $name }} filePathPattern: {{ $pattern }} {{- end }} + exporter: + containerName: metrics + scrapePath: /metrics + scrapePort: http-metrics configs: - name: redis-replication-config templateRef: redis7-config-template