From 0e4711b17cfb08afd1b40820fb97166cba203ed0 Mon Sep 17 00:00:00 2001 From: Maxim Belyy Date: Wed, 11 Nov 2026 05:41:51 +0700 Subject: [PATCH] docs(observability-proxy): bound the exporter trust to platform scrapes The cozy-* condition holds only for series the platform's vmagent scraped. A tenant's nested Kubernetes cluster remote-writes into the same store and picks its own namespace labels, cozy-* among them, so the comment must not promise that tenants can never produce such a series. That writer could already pass the namespace="" branch, and the exporter branch gives it nothing more. Assisted-by: LLM Signed-off-by: Maxim Belyy --- internal/observabilityproxy/metricsparams.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/observabilityproxy/metricsparams.go b/internal/observabilityproxy/metricsparams.go index c300cdc7a..b2086e494 100644 --- a/internal/observabilityproxy/metricsparams.go +++ b/internal/observabilityproxy/metricsparams.go @@ -92,9 +92,12 @@ func namespaceSelector(ns string) string { // namespaceScope selects the series of namespace ns. Besides its own, it // takes the series an exporter in a platform namespace attributes to ns: // vmagent sets namespace to the scraped target's and, without honorLabels, -// moves the exporter's own namespace label to exported_namespace. Only -// platform namespaces are trusted with that label, since any tenant pod can -// write it; tenants cannot run pods or scrape objects in them. +// moves the exporter's own namespace label to exported_namespace. Any pod +// can write that label, so it is trusted only where the platform's vmagent +// set namespace to one with the platform prefix, in which tenants cannot run +// pods or scrape objects. Series remote-written from a tenant's nested +// cluster carry whatever namespace that cluster chose, so they are outside +// this guarantee for both values alike. func (c MetricsConfig) namespaceScope(ns string) []string { scope := []string{namespaceSelector(ns)} if c.PlatformNamespacePrefix != "" {