From 5987b30a0bf88e166aa83bf1e9c76da1293ed5eb Mon Sep 17 00:00:00 2001 From: shaoyue Date: Fri, 23 Aug 2024 16:36:51 +0800 Subject: [PATCH] fix metric interval (#176) Signed-off-by: haorenfsa --- pkg/controllers/podmonitor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/controllers/podmonitor.go b/pkg/controllers/podmonitor.go index 33c92fc1..4ffa375a 100644 --- a/pkg/controllers/podmonitor.go +++ b/pkg/controllers/podmonitor.go @@ -35,6 +35,9 @@ func (r *MilvusReconciler) updatePodMonitor( }, } } + for i := range podmonitor.Spec.PodMetricsEndpoints { + podmonitor.Spec.PodMetricsEndpoints[i].Interval = interval + } podmonitor.Spec.NamespaceSelector = monitoringv1.NamespaceSelector{ MatchNames: []string{mc.Namespace},