Skip to content

Commit cd736fe

Browse files
authored
Update metrics endpoint for NIMs to be /v1/metrics as per latest API spec (#265) (#267)
Signed-off-by: Shiva Krishna, Merla <smerla@nvidia.com>
1 parent ed2e8a5 commit cd736fe

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

api/apps/v1alpha1/nimservice_types.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,22 @@ func (n *NIMService) GetServiceMonitorParams() *rendertypes.ServiceMonitorParams
760760

761761
// Set Service Monitor spec
762762
smSpec := monitoringv1.ServiceMonitorSpec{
763-
NamespaceSelector: monitoringv1.NamespaceSelector{MatchNames: []string{n.Namespace}},
764-
Selector: metav1.LabelSelector{MatchLabels: n.GetServiceLabels()},
765-
Endpoints: []monitoringv1.Endpoint{{Port: "service-port", ScrapeTimeout: serviceMonitor.ScrapeTimeout, Interval: serviceMonitor.Interval}},
763+
NamespaceSelector: monitoringv1.NamespaceSelector{
764+
MatchNames: []string{n.Namespace},
765+
},
766+
Selector: metav1.LabelSelector{
767+
MatchLabels: n.GetServiceLabels(),
768+
},
769+
Endpoints: []monitoringv1.Endpoint{
770+
{
771+
Port: "service-port",
772+
Path: "/v1/metrics",
773+
ScrapeTimeout: serviceMonitor.ScrapeTimeout,
774+
Interval: serviceMonitor.Interval,
775+
},
776+
},
766777
}
778+
767779
params.SMSpec = smSpec
768780
return params
769781
}

0 commit comments

Comments
 (0)