fix(helm): allow ingress to the metrics port in the network policies - #998
Merged
Conversation
Both network policy flavors allowed ingress only to the aggregator port. When the prometheus exporter is enabled, Prometheus / Alloy scrapes of the /metrics endpoint on the prometheus port were blocked (up = 0) even with the ServiceMonitor in place. Add the prometheus port to the ingress rules, gated on the same helper that gates the metrics ports and the ServiceMonitor.
fiunchinho
marked this pull request as ready for review
July 29, 2026 10:34
fiunchinho
enabled auto-merge (squash)
July 29, 2026 10:35
marians
approved these changes
Jul 29, 2026
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.
Why
Follow-up to #997. On gazelle, muster
v1.4.2now renders the ServiceMonitor and serves/metrics, and Alloy discovers the target — but the scrape fails (up= 0 in Mimir). Both network policy flavors allow ingress only to the aggregator port (8090), so the scraper cannot reach the prometheus port (9464). Akubectl port-forwardtest passes because port-forward traffic does not traverse the network policy — which is how the gap survived local verification.What
Add the prometheus metrics port to the ingress rules of both templates, gated on the same
muster.prometheusExporterEnabledhelper that gates the metrics container/Service ports and the ServiceMonitor:templates/ciliumnetworkpolicy.yaml: thefromEntities: [cluster]ingress rule also allows the prometheus port.templates/networkpolicy.yaml: thenamespaceSelector: {}ingress rule also allows the prometheus port.When the exporter is disabled (the default), the rendered policies are unchanged.
Testing
helm unittest: four new cases — per flavor, default renders only 8090; with the prometheus exporter enabled (via the ServiceMonitor toggle for cilium, viaexporter: "prometheus"for kubernetes) the ingress also allows 9464. 14/14 pass in the suite.make helm-lintpasses.up{namespace="agentic-platform", service="muster"}in Mimir should report1.