Wires the chart side of the daemon's MeterProvider: when
`telemetry.otlpEndpoint` is set, inject OTEL_EXPORTER_OTLP_ENDPOINT and
OTEL_SERVICE_NAME into the sandbox container. Empty by default, which is
what the daemon already treats as "register no provider" — so this is
additive and inert until an operator opts in.
Endpoint-agnostic on purpose: the value belongs in the per-env values, not
here. But picking one is not free, so values.yaml carries the constraint
that will otherwise cost someone an afternoon — netinit's iptables REJECTs
the RFC1918 blockCIDRs BEFORE the port ACCEPTs, so a collector on an
in-cluster ClusterIP is unreachable no matter which port is added to
allowedTCPPorts, and every export is dropped silently. An address that
clears that rule (e.g. the collector's LoadBalancer on the already-allowed
443) needs no netinit change at all.
Also notes the trust consequence: this opens a path from pods running
untrusted user code to the collector.
Chart side of #5339. That PR gives the daemon a
MeterProviderthat stays dormant withoutOTEL_EXPORTER_OTLP_ENDPOINT; this one lets an operator set it.Renders nothing when empty; injects both env vars when set. Verified with
helm templateboth ways,helm lintclean.Endpoint-agnostic on purpose — the actual URL belongs in the per-env values in
deco-apps-cd, not in the chart. That's also why this isn't blocked on deciding which collector address to use: the chart change is identical for every option.The constraint that makes this non-obvious
values.yamlnow documents it, because getting it wrong fails silently — every export is dropped and the dashboard just stays empty. Sandbox egress is the netinit iptables init container, not a NetworkPolicy, and it appends:The CIDR REJECT fires before the port ACCEPTs. A collector on an in-cluster ClusterIP lands in RFC1918, i.e. inside
blockCIDRs, so it is unreachable no matter which port is added toallowedTCPPorts—gateway-otlpis172.20.146.131, inside172.16.0.0/12. Reaching a ClusterIP would need a destination-scoped ACCEPT inserted ahead of theblockCIDRsloop, which this PR does not add.An address that already clears the rule needs no netinit change:
gateway-otlp-ingestis a LoadBalancer on443:32184/TCP, and 443 is already inallowedTCPPorts. That's the recommended value, pending confirmation of what auth that listener expects.Also noted in values: enabling this opens a path from pods running untrusted user code to the collector, so a compromised sandbox can emit arbitrary series. The daemon only ever sends fixed instrument names with derived attribute values.
Notes
0.9.33→0.9.34, changelog entry added (the publish workflow skips existing versions).Summary by cubic
Adds an opt-in OTLP metrics endpoint for the sandbox daemon. Default behavior stays the same until you set
telemetry.otlpEndpoint.New Features
OTEL_EXPORTER_OTLP_ENDPOINTandOTEL_SERVICE_NAMEwhentelemetry.otlpEndpointis set (chart v0.9.34; README/values updated).Migration
telemetry.otlpEndpointto a collector address reachable past netinit. In-cluster ClusterIP is blocked by RFC1918 REJECT; use the collector’s LoadBalancer on 443 or adjust netinit. Enabling allows sandbox pods to reach your collector.Written for commit 909f30c. Summary will update on new commits.