Task · SKT-0006.03

k3d capture lab: real k8s-monitoring egress into a capture receiver, local one-shot plus nightly CI

Description

Layer 2a, the primary corpus producer. Stands up a throwaway k3d cluster, a workload deck shaped like the reference otel-demo deployment, and the real grafana/k8s-monitoring Helm chart pinned to the version synthkit claims to model — with the capture receiver as its only destination. The captured egress becomes corpus input for the generic k8s-monitoring and application-observability surface that the base blueprints model and that most users will exercise.

Capture must sit at the collector egress, not at the scrape targets: the ambient label set synthkit models (cluster, k8s_cluster_name, job, instance, source=“kubernetes”) is produced by the chart relabelling, so only Alloy output shows the real shape.

Reference for chart version and values: m7kni/rkps-awsinfra applications/core/k8s-monitoring.yaml (chart 4.4.0) and applications/k8s-monitoring/values.yaml. Strip cloud destinations and credentials; keep the feature toggles.

Known blockers found during scoping:

Acceptance Criteria

Definition of Done

Implementation Plan

Run contract and ownership

Dependencies and frozen seams

Implementation sequence

  1. Lane 4 adds e2e/lab scaffolding: pinned versions and workload images, sanitized chart values, workload deck, receiver deployment/service/TLS setup, exact-cluster cleanup trap, capture wait, provenance-stamped candidate, and a human-readable findings report.
  2. Root reviews and renders Helm 4.2.4 with chart 4.4.0, then runs the lab end to end using exclusive local Docker/k3d/Helm/kubectl access. Debug only the real collector path and preserve collector-egress capture.
  3. Root adds one Make target and a scheduled plus workflow_dispatch GitHub workflow that invokes the same target without Grafana credentials and uploads candidate/findings artifacts. Render/lint the workflow and run one manual workflow_dispatch.
  4. Run focused checks and CodeRabbit before the code commit, dispatch the read-only Terra/low gate lane to run make gate once, then run the required structural dump comparison and final local lab evidence.
  5. Commit explicit paths, push main, inspect exact-SHA CI, finalize SKT-0006.03 through Backlog CLI, commit/push terminal tracker state, then stop.

Implementation Notes

2026-08-24 integration evidence: Helm 4.2.4 rendered grafana/k8s-monitoring 4.4.0 into 2975 lines and 30 Kubernetes objects with only the three in-cluster capture endpoints. The exact make signal-fidelity-k3d target completed locally: 89 metric contracts, 2 log contracts, RW1 count 294, OTLP-log count 14, and PASS for cluster, k8s_cluster_name, job, instance, and source=kubernetes. The candidate provenance is substrate=k3s and chart_version=4.4.0. Exact-name teardown was observed after ordinary success, multiple failures, and Ctrl-C. conformance.go contains no hardcoded chart-version literal; it emits the blueprint-provided km.ChartVersion, recorded as the task-required audit finding without changing the signal contract. CodeRabbit completed with 7 findings: both Major findings and two valid Minors were fixed; three Minors were dismissed because the workflow has ample remaining timeout, the live stateful receiver was healthy under its memory-only limit and repository policy avoids CPU limits, and the real chart successfully scraped both extensionless BusyBox metrics.

2026-08-24 final gate evidence: the read-only GATE lane confirmed gpt-5.6-terra/low, ran make gate exactly once, and exited 0. Root then ran make dump exactly once; the complete-catalog structural inventory exited 0 with 2645 distinct metric series-name/label-key shapes and 15 profile types, with no error, fatal, or panic output. Per SKT-0004, assessment used the authoritative structural inventory rather than sampled exemplars or the wall-clock-dependent sigil generation/score counts. make blueprint-schema was skipped because no blueprint field or construct/workload config struct changed.

2026-08-24 hosted-run evidence: the first workflow dispatch exposed an invalid upload-artifact pin and the second exposed a non-portable rg dependency; both failed before creating a cluster or tore down safely. The fixes pinned verified actions/upload-artifact v7.0.1 at 043fb46d1a93c77aae656e7c1c64a875d1fc6a0a and changed the executable conformance audit to ubiquitous grep. actionlint, zizmor, the static lab validator, ShellCheck, and git diff checks passed; the follow-up CodeRabbit review completed with zero findings. Manual workflow_dispatch run 32739962451 at head 863dec936bf36d38472d9b466d7e4013f2a9afbb succeeded. Published artifact 9524811269 contains schema synthkit.telemetry.inventory/v1alpha1 with substrate=k3s, chart_version=4.4.0, 44 metric contracts, 2 log contracts, RW1 count 494, OTLP-log count 18, PASS for cluster/k8s_cluster_name/job/instance/source=kubernetes, and explicit successful teardown. Exact-head CI run 32739955181 passed Docker, Go, E2E, UI, and secret-scan; hygiene alone failed on the known pre-existing forbidden term in parent SKT-0006 and ci-success followed that failure. The parent task is outside this run scope.

Final Summary

Added a disposable, credential-free k3d capture lab and nightly/manual GitHub workflow for grafana/k8s-monitoring 4.4.0. Verified real collector-egress RW1 and OTLP-log decoding, k3s provenance, chart-added ambient labels, reliable teardown, local gate and structural dump, focused static checks, CodeRabbit, exact-head CI, and successful hosted workflow artifact publication in run 32739962451.

View the source file on GitHub