fix(helm): make Hubble ServiceMonitor target configurable - #2620
Open
Abdulla Zin (abdullazin) wants to merge 5 commits into
Open
fix(helm): make Hubble ServiceMonitor target configurable#2620Abdulla Zin (abdullazin) wants to merge 5 commits into
Abdulla Zin (abdullazin) wants to merge 5 commits into
Conversation
…-service The hubble/servicemonitor.yaml template has three mismatches with the network-observability Service defined in hubble/metrics-service.yaml: 1. Namespace: references .Values.prometheus.serviceMonitor.namespace which is not defined in the chart values, causing a nil pointer panic when hubble.metrics.serviceMonitor.enabled is set to true. 2. Selector: uses k8s-app: hubble but the network-observability Service is labelled k8s-app: networkobservability. 3. Port name: targets hubble-metrics but the Service port is named hubble. These issues mean that enabling the Hubble metrics ServiceMonitor either crashes helm template or produces a resource that never discovers the Service, leaving Hubble pod-level metrics (hubble_drop_total, hubble_dns_queries_total, hubble_flows_processed_total, etc.) unscraped. Also updates app.kubernetes.io/part-of from cilium to retina since this is the Retina chart, not Cilium. Signed-off-by: Abdulla Zin <Abdulla.Zin@goto.com>
Signed-off-by: Abdulla Zin <abdulla.zin@goto.com>
Signed-off-by: Abdulla Zin <abdulla.zin@goto.com>
Abdulla Zin (abdullazin)
marked this pull request as ready for review
August 6, 2026 17:36
Abdulla Zin (abdullazin)
requested review from
Jacques I Massa (jimassa) and
Evan Baker (rbtr)
August 6, 2026 17:37
Signed-off-by: Abdulla Zin <abdulla.zin@goto.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds supported configuration for the Hubble metrics ServiceMonitor without changing its existing rendered default selector, port, or namespace.
Problem
The Hubble metrics ServiceMonitor currently reads
.Values.prometheus.serviceMonitor.namespace, but that values path is not declared in this chart. Enablinghubble.metrics.serviceMonitor.enabledtherefore fails Helm rendering with a nil-pointer error.Deployments that use Retina's
network-observabilitymetrics Service also need a way to configure the ServiceMonitor's selector labels and target port. That Service usesk8s-app: networkobservabilityand named porthubble, unlike the chart's current default ServiceMonitor target.Changes
hubble.metrics.serviceMonitor.namespace, defaulting to the release namespace.hubble.metrics.serviceMonitor.selectorLabelsandportas supported configuration values.k8s-app: hubbleandhubble-metrics.This is backward-compatible for existing values: an enabled ServiceMonitor renders the same selector, port, and namespace as before, except that it now renders successfully without an undeclared
prometheusvalues map. Retina deployments can opt in to theirnetwork-observabilityService by overriding the new selector and port values.Validation
helm lint .passes.hubble.metrics.serviceMonitor.enabled=trueretainsk8s-app: hubble, porthubble-metrics, and the release namespace.namespace=metrics-monitoring,selectorLabels.k8s-app=networkobservability, andport=hubbleproduces the requested cross-namespace ServiceMonitor.Related to #1872