Repository navigation
Description
Regression of #1135 (shipped in v0.2.35): the tempo pod has never been admitted.
Friction
Traces have never been stored. #1135 (v0.2.35) shipped Grafana Tempo in namespace otel, but the namespace enforces PodSecurity restricted and k8s/otel/tempo-values.yaml sets no restricted securityContext. The API server refuses every tempo-0 pod, so the StatefulSet has run 0 of 1 replicas since it was deployed. The feature #1135 delivered is a regression from day one, and no check caught it before or after the merge.
Evidence
Live, read-only, 2026-10-17 and 2026-10-18 (main = 3dd7fa6):
- Namespace
otelcarriespod-security.kubernetes.io/enforce=restricted(also audit and warn). - StatefulSet
otel/tempo(charttempo3.1.0 from grafana-community, imagedocker.io/grafana/tempo:3.1.0, Argo CD ApplicationtempoSynced) reports replicas 0, availableReplicas 0. - Event
FailedCreateonotel/tempo, count 373 by 2026-10-18T01:00Z:pods "tempo-0" is forbidden: violates PodSecurity "restricted:latest": allowPrivilegeEscalation != false (container "tempo" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities ..., plus the seccompProfile requirement. - PVC
otel/storage-tempo-0is Pending (WaitForFirstConsumer, no pod ever scheduled). - Collector side:
increase(otelcol_exporter_sent_spans{exporter="otlp_grpc/tempo"}[4d])= 0, send_failed_spans = 20,869, and the exporter's sending queue is at 100% capacity. Grafana's Tempo datasource health check gets "connection refused".
Repo:
k8s/otel/tempo-values.yaml:1-81sets nosecurityContextand notempo.securityContext.- Chart 3.1.0 defaults (
helm show values grafana-community/tempo --version 3.1.0): podsecurityContext= runAsUser/runAsGroup/fsGroup 10001, runAsNonRoot true, with no seccompProfile; containertempo.securityContext: {}. The rendered StatefulSet has a single container,tempo(tempoQuery is not rendered). k8s/argocd/apps/tempo.yaml:11-13pins the chart;tests/test_k8s_tempo.py:17(test_tempo_stack_contract_and_datasource_links) pins the chart and datasource links but nothing about pod security.- A throwaway manifest with the fix below passed
kubectl apply --dry-run=serverin namespaceotel(proven during this audit).
Remedy
Tests first, then values; deployed by Argo CD Application tempo (and deploy-stack's tempo release, which reads the same values file).
- Extend
tests/test_k8s_tempo.pywith one structural-tuple assertion overk8s/otel/tempo-values.yaml: podsecurityContext.seccompProfile.type == "RuntimeDefault"andrunAsNonRoot is True;tempo.securityContexthasallowPrivilegeEscalation is False,capabilities.drop == ["ALL"]andreadOnlyRootFilesystem is True. It fails today. - In
k8s/otel/tempo-values.yaml, set the podsecurityContext(keep the chart's runAsUser/runAsGroup/fsGroup 10001 and runAsNonRoot true; Helm merges maps, but state them so the test pins them) withseccompProfile: {type: RuntimeDefault}, and settempo.securityContexttoallowPrivilegeEscalation: false,capabilities: {drop: [ALL]},readOnlyRootFilesystem: true. Tempo writes only under/var/tempo, which is the PVC mount. Do not relax the namespace'srestrictedlevel. - Add a guard so the next chart in a restricted namespace cannot ship the same way: a test that, for every Helm release whose namespace
k8s/namespaces.yamllabelsrestricted, asserts its values file sets the restricted container fields (or names a reviewed exemption). The general render-and-admit check belongs with feat(release): a release is cut only after every argo cd application builds at the release head and its live changes are shown #1343, which builds every Application at the release head; link it there rather than adding a network call to the test suite. changelog.d/<issue>.mdunder### Fixed, citing feat(telemetry): traces are stored in tempo on a volume, and grafana and devops-cli read them, linked to logs and profiles #1135.
Verification after Argo CD syncs main (a person or an agent, read-only):
kubectl -n otel get sts temposhows 1/1 andkubectl -n otel get pvc storage-tempo-0shows Bound.increase(otelcol_exporter_sent_spans{exporter="otlp_grpc/tempo"}[15m]) > 0and send_failed stops increasing; the queue drains.- Grafana's Tempo datasource health check passes, and a devops-cli trace is found by TraceQL.
- If readOnlyRootFilesystem breaks start-up, add an
emptyDirfor the path Tempo names in its error throughtempo.extraVolumeMounts, rather than dropping the setting.
Priority: P0. A feature shipped in v0.2.35 (#1135) has never run; this is its regression fix.
Activity
fix(k8s): tempo runs under the otel namespace's restricted pod securi…
dan-petty commentedon Oct 18, 2026
What changed
#1633, merged into
release/v0.2.37as bfb312a.5 file(s) changed.
How it was verified
Check runs at 701ccf1:
Acceptance Criteria of
docs/agent/tasks/task-1627-tempo-pod-security.md:restrictedrequires (test_tempo_pod_meets_the_otel_namespaces_restricted_pod_security).otel, and the previous values are refused.mainand Argo CD syncstempo,kubectl -n otel get pod tempo-0is Running and thestorage-tempo-0claim is Bound.feat(release): v0.2.37 (#1720)