Skip to content

chore: add metrics service to prometheus component#78

Merged
scotwells merged 1 commit intomainfrom
chore/add-metrics-service-to-prometheus-component
Mar 18, 2026
Merged

chore: add metrics service to prometheus component#78
scotwells merged 1 commit intomainfrom
chore/add-metrics-service-to-prometheus-component

Conversation

@scotwells
Copy link
Contributor

Summary

  • Add metrics_service.yaml to the prometheus kustomize Component resources
  • When operators deploy from path: manager with ../prometheus as a component, the ServiceMonitor is deployed but the matching metrics Service is missing
  • This adds the Service to the Component so metrics endpoints are discoverable

Test plan

  • kustomize build config/manager with the prometheus component includes both ServiceMonitor and metrics Service
  • VMAgent discovers and scrapes metrics from the operator after deployment

@scotwells scotwells force-pushed the chore/add-metrics-service-to-prometheus-component branch from 38f6cc5 to 46812af Compare March 18, 2026 20:47
Include metrics_service.yaml in the prometheus kustomize Component
so that deploying with the prometheus component provides both the
ServiceMonitor and the matching Service for metrics scraping.

Add app.kubernetes.io/name selector to Service and ServiceMonitor
to uniquely target this operator's pods in shared namespaces.
@scotwells scotwells force-pushed the chore/add-metrics-service-to-prometheus-component branch 2 times, most recently from 0c774c8 to 3e2017a Compare March 18, 2026 20:53
@scotwells scotwells merged commit 171587f into main Mar 18, 2026
9 checks passed
@scotwells scotwells deleted the chore/add-metrics-service-to-prometheus-component branch March 18, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants