mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
A platform exporter such as the ClickHouse operator's runs in its own cozy-* namespace and reports on objects in tenant namespaces. vmagent labels its series with the exporter's namespace and moves the namespace the exporter reported to exported_namespace, so the namespace root, scoped to namespace="<ns>" alone, never returned them. The scope gains a second extra_filters[] value matching exported_namespace="<ns>" only on series scraped from a namespace with the platform prefix. A bare exported_namespace condition would let any tenant pod that writes a namespace label inject series into another tenant's namespace root. vmselect ORs the two values, and the label APIs repeat both in match[], where the match[] and extra_filters[] cross join still selects exactly their union. An empty prefix keeps the previous single-value scope. Assisted-by: LLM Signed-off-by: Maxim Belyy <maximbel2003@gmail.com>