feat(openshift): add ServiceMonitor for remote resolvers - #3920
Conversation
|
|
Code ReviewThanks for adding coverage for the remote resolvers — this fills the last observability gap in the pipeline component family. The YAML itself is structurally correct (selector, port name, namespace selector, annotations all check out against the live manifests). However there is a critical mTLS wiring gap that will cause scraping to silently break on any cluster where the operator has enabled metrics mTLS. 🔴 Critical — ServiceMonitor not wired into the mTLS upgrade pathThe project has a full mTLS-for-metrics subsystem in occommon.AnnotateMetricsServingCert(tektonRemoteResolversControllerName),
occommon.RenameServicePort(tektonRemoteResolversControllerName,
occommon.MetricsHTTPPort, occommon.MetricsHTTPSPort), // http-metrics -> https-metrics
occommon.ApplyMetricsTLS("Deployment", tektonRemoteResolversControllerName, ...),
occommon.ApplyMetricsTLS("StatefulSet", tektonRemoteResolversControllerName, ...),So when mTLS is active:
But Fix — add one entry to occommon.UpdateServiceMonitorForMetricsMTLS(
"openshift-pipelines-resolvers-monitor",
occommon.MetricsHTTPPort, occommon.MetricsHTTPSPort,
tektonRemoteResolversControllerName, targetNS),This is the same call made for Minor suggestions
What's good
The YAML file just needs the companion |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3920 +/- ##
==========================================
- Coverage 26.14% 26.13% -0.01%
==========================================
Files 465 465
Lines 24940 24944 +4
==========================================
Hits 6520 6520
- Misses 17698 17702 +4
Partials 722 722
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Expose Prometheus metrics for tekton-pipelines-remote-resolvers by adding a ServiceMonitor, matching the existing monitors for the pipeline controller, webhook, triggers, and chains. Signed-off-by: Deekshith Kumar Netha Bamandla N <dbamandl@redhat.com> Assisted-by: Claude Sonnet 5 (via Cursor) Co-authored-by: Cursor <cursoragent@cursor.com>
Add the missing UpdateServiceMonitorForMetricsMTLS entry for openshift-pipelines-resolvers-monitor so it upgrades to https-metrics in lockstep with the other five monitors when metrics mTLS is enabled. Without this, the resolvers ServiceMonitor would keep requesting the now-renamed http-metrics port, breaking Prometheus scraping on mTLS-enabled clusters. Signed-off-by: Deekshith Kumar Netha Bamandla N <dbamandl@redhat.com> Assisted-by: Claude Sonnet 5 (via Cursor)
1021aad to
d850bf8
Compare
|
/retest |
1 similar comment
|
/retest |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jkhelil The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
Adds a
ServiceMonitorfor thetekton-pipelines-remote-resolversdeployment on OpenShift, so its metrics (exposed on thehttp-metricsport) get scraped by the cluster's Prometheus, consistent with the existing monitors for the pipeline controller, webhook, triggers, chains, results, and pruner.New file:
cmd/openshift/operator/kodata/openshift-monitoring/04-pipeline-resolvers-monitoring.yamlVerified on a live OpenShift (ROSA) cluster: the ServiceMonitor is created automatically alongside the others, with selector and port matching the live
tekton-pipelines-remote-resolversService.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes