---
id: w3/m2/t005
title: Cluster enablement + tests + docs
worker: worker3
status: done
estimate: 40m
depends_on: [w3/m2/t001, w3/m2/t003]
---

## Objective

Ensure the metrics dependencies exist in the mock cluster, add test coverage, and finish the metrics docs.

## Context

- Resource metrics need **metrics-server**; request metrics need **Traefik metrics enabled**. Both are platform infra (`scripts/mock-cluster.sh` / `deploy/gitops/`) owned by w1 — this task confirms/wires them for w3 and flags any gap as a w1 prerequisite.
- Tests: unit for adapters + envtest where feasible (`operator/internal/api/api_test.go`, controller suite patterns).

## Steps

1. Confirm metrics-server is installed by `scripts/mock-cluster.sh` (or gitops); add it if missing or file a w1 dependency.
2. Confirm Traefik metrics are enabled and scrapeable; document how bex-api reaches them.
3. Add unit/envtest coverage for the metrics paths; write the `docs/ADR010-observability.md` metrics section + update `docs/ADR006-bex-api.md`.

## Files

- `scripts/mock-cluster.sh` and/or `deploy/gitops/` (or a w1 dependency note), `operator/internal/api/api_test.go`, `docs/ADR010-observability.md`, `docs/ADR006-bex-api.md`

## Acceptance criteria

- [ ] metrics-server + Traefik metrics confirmed present in the mock cluster (or gap filed as a w1 prerequisite).
- [ ] Metrics endpoints verified end-to-end against the mock cluster; `make test` green.
- [ ] `docs/ADR010-observability.md` + `docs/ADR006-bex-api.md` document the metrics API.

## Out of scope

- Durable metric store, remote-write / third-party observability integrations (deferred per `w3/001`).
