retina icon indicating copy to clipboard operation
retina copied to clipboard

[Helm] retina-hubble v1.3.3 ServiceMonitor uses the wrong Service selector and port

Open JohnMaddison opened this issue 1 week ago • 2 comments

Describe the bug

In the retina-hubble Helm chart v1.3.3, enabling hubble.metrics.serviceMonitor.enabled creates a ServiceMonitor whose label selector and named port do not match the network-observability Service. As a result, Prometheus cannot discover the Service’s Hubble metrics endpoint through this ServiceMonitor.

To Reproduce

  1. Render the ServiceMonitor and metrics Service. The issue can be reproduced locally without a Kubernetes cluster.
   helm template retina oci://ghcr.io/microsoft/retina/charts/retina-hubble \
  --version v1.3.3 \
  --namespace retina \
  --set hubble.metrics.serviceMonitor.enabled=true \
  --set prometheus.serviceMonitor.namespace=monitoring \
  --show-only templates/hubble/servicemonitor.yaml \
  --show-only templates/hubble/metrics-service.yaml
  1. Compare the ServiceMonitor’s spec.selector.matchLabels with the Service’s metadata.labels. The ServiceMonitor selects k8s-app: hubble, but the Service has k8s-app: networkobservability.
  2. Compare the ServiceMonitor’s spec.endpoints[0].port with the Service’s spec.ports. The ServiceMonitor references hubble-metrics, but the Service exposes port 9965 under the name hubble.

Expected behavior

The generated ServiceMonitor should select the network-observability Service in the retina namespace and scrape /metrics on its named hubble port.

Screenshots

N/A.

Platform (please complete the following information):

  • Retina Version: v1.3.3 (retina-hubble Helm chart)

Additional context

The ServiceMonitor’s namespaceSelector correctly targets retina. Enabling the ServiceMonitor also removes the prometheus.io/scrape and prometheus.io/port annotations from the metrics Service, so annotation-based discovery no longer covers this endpoint.

JohnMaddison avatar Nov 20 '26 10:11 JohnMaddison

Let me know if you want me to create a pull request, currently doing a workaround for this with a separate servicemonitor but would like this fixed upstream :)

JohnMaddison avatar Nov 20 '26 10:11 JohnMaddison

@JohnMaddison Please go ahead and create PR

ibezrukavyi avatar Nov 24 '26 18:11 ibezrukavyi