feat(observability-proxy): expose the platform namespace prefix in the chart

The value is always passed, also when empty, so that clearing it in
the values turns the exporter series off instead of falling back to
the binary's default.

Assisted-by: LLM
Signed-off-by: Maxim Belyy <maximbel2003@gmail.com>
This commit is contained in:
Maxim Belyy committed 2026-11-10 19:43:21 +07:00
1 parent 053026c8df
commit 84d490e1bf
3 files changed
+21

No files matched your search

@@ -41,6 +41,7 @@ spec:
- --metrics-shortterm-store={{ .Values.observabilityProxy.metrics.shorttermStore }}
- --metrics-longterm-store={{ .Values.observabilityProxy.metrics.longtermStore }}
- --metrics-shortterm-retention={{ .Values.observabilityProxy.metrics.shorttermRetention }}
- --metrics-platform-namespace-prefix={{ .Values.observabilityProxy.metrics.platformNamespacePrefix }}
ports:
- name: http
containerPort: 8080
@@ -51,6 +51,9 @@ tests:
- contains:
path: spec.template.spec.containers[0].args
content: --metrics-shortterm-retention=72h
- contains:
path: spec.template.spec.containers[0].args
content: --metrics-platform-namespace-prefix=cozy-
- it: follows renamed metrics stores
set:
@@ -69,6 +72,19 @@ tests:
path: spec.template.spec.containers[0].args
content: --metrics-shortterm-retention=24h
# An empty value must reach the binary as an explicit empty flag; a
# dropped flag would fall back to the cozy- default.
- it: passes an empty platform namespace prefix through
set:
observabilityProxy.metrics.platformNamespacePrefix: ""
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: --metrics-platform-namespace-prefix=
- notContains:
path: spec.template.spec.containers[0].args
content: --metrics-platform-namespace-prefix=cozy-
- it: falls back to cozy.local when the platform passes no cluster domain
asserts:
- contains:
@@ -14,6 +14,10 @@ observabilityProxy:
shorttermStore: shortterm
longtermStore: longterm
shorttermRetention: 72h
# Exporters in namespaces with this prefix may attribute a series to a
# tenant namespace through exported_namespace, and the series is then
# part of that namespace's metrics. Empty disables it.
platformNamespacePrefix: cozy-
resources:
requests:
cpu: 10m