mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
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="<ns>" branch, and the exporter branch gives it nothing more. Assisted-by: LLM Signed-off-by: Maxim Belyy <maximbel2003@gmail.com>
This commit is contained in:
1 parent
84d490e1bf
commit
0e4711b17c
1 file changed
+6
-3
@@ -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 != "" {
|
||||
|
||||
Reference in new issue
Block a user