Skip to content

Commit 26ac873

Browse files
authored
docs: update SPEC.md test counts, project structure, and roadmap (#176)
- Test pyramid: updated from ~10/~50/~200+ to 36+22 E2E / 1500+ unit - Project structure: added missing packages (operatormetrics, throttle, transform, validation, kubectl-attune), removed non-existent files (status.go, revert.go), expanded controller and webhook listings - Roadmap: checked off all Phase 1-4 items and 3 Phase 5 items that are complete (kubectl plugin, Datadog/CloudWatch, memory decrease) Closes #173 Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent 35d3e65 commit 26ac873

1 file changed

Lines changed: 63 additions & 65 deletions

File tree

docs/SPEC.md

Lines changed: 63 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -852,15 +852,14 @@ Ship a pre-built Grafana dashboard JSON covering:
852852
```
853853
┌───────────┐
854854
│ E2E │ Chainsaw: real cluster, full lifecycle
855-
│ Tests │ ~10 scenarios
855+
│ Tests │ 36 Chainsaw + 22 Go E2E scenarios
856856
├───────────┤
857857
│Integration│ envtest: real API server + etcd
858858
│ Tests │ Controller reconciliation, CRD validation
859-
│ │ ~50 test cases
860859
├───────────┤
861860
│ Unit │ Standard Go testing + testify
862861
│ Tests │ Algorithm, estimators, resize logic
863-
│ │ ~200+ test cases
862+
│ │ 1500+ test cases
864863
└───────────┘
865864
```
866865

@@ -1357,47 +1356,46 @@ attune/
13571356
│ ├── zz_generated.deepcopy.go
13581357
│ └── doc.go
13591358
├── cmd/
1360-
│ └── manager/
1361-
│ └── main.go
1359+
│ ├── manager/
1360+
│ │ └── main.go # Operator entry point
1361+
│ └── kubectl-attune/
1362+
│ └── main.go # kubectl plugin
13621363
├── internal/
1363-
│ ├── controller/
1364+
│ ├── conflict/
1365+
│ │ ├── detector.go # VPA, HPA, policy conflict detection
1366+
│ │ └── detector_test.go
1367+
│ ├── controller/ # Reconciler (core business logic)
13641368
│ │ ├── attunepolicy_controller.go
13651369
│ │ ├── attunepolicy_controller_test.go
1366-
│ │ └── suite_test.go
1370+
│ │ └── ... # helpers, resize, prometheus, export, etc.
13671371
│ ├── metrics/
1368-
│ │ ├── collector.go # Prometheus query client
1372+
│ │ ├── collector.go # Prometheus/Datadog/CloudWatch query client
13691373
│ │ ├── collector_test.go
13701374
│ │ ├── profile.go # UsageProfile construction
13711375
│ │ └── profile_test.go
1376+
│ ├── operatormetrics/ # Operator-level Prometheus metrics (init-registered)
1377+
│ │ └── metrics.go
13721378
│ ├── recommendation/
13731379
│ │ ├── estimator.go # Estimator interface
13741380
│ │ ├── percentile.go # Percentile estimator
1375-
│ │ ├── percentile_test.go
13761381
│ │ ├── margin.go # Safety margin estimator
1377-
│ │ ├── margin_test.go
13781382
│ │ ├── confidence.go # Confidence multiplier
1379-
│ │ ├── confidence_test.go
13801383
│ │ ├── bounds.go # Bounds clamper
1381-
│ │ ├── bounds_test.go
13821384
│ │ ├── chain.go # Composable chain
1383-
│ │ ├── chain_test.go
13841385
│ │ └── fuzz_test.go
13851386
│ ├── resize/
1386-
│ │ ├── engine.go # Pod resize via /resize
1387-
│ │ ├── engine_test.go
1388-
│ │ ├── status.go # Resize status polling
1389-
│ │ └── status_test.go
1387+
│ │ ├── engine.go # Pod resize via /resize subresource
1388+
│ │ └── engine_test.go
13901389
│ ├── safety/
1391-
│ │ ├── monitor.go # OOMKill, throttle, restart detection
1392-
│ │ ├── monitor_test.go
1393-
│ │ ├── revert.go # Auto-revert logic
1394-
│ │ └── revert_test.go
1395-
│ ├── conflict/
1396-
│ │ ├── detector.go # VPA, HPA, policy conflict detection
1397-
│ │ └── detector_test.go
1390+
│ │ ├── monitor.go # OOMKill, throttle, restart, auto-revert
1391+
│ │ └── monitor_test.go
1392+
│ ├── throttle/ # Shared throttle checker interface
1393+
│ ├── transform/ # Informer cache transform functions
1394+
│ ├── validation/ # Shared validation (Prometheus SSRF checks)
13981395
│ └── webhook/
13991396
│ ├── defaulting.go # Defaulting webhook
1400-
│ └── validation.go # Validation webhook (for complex rules)
1397+
│ ├── validation.go # Validation webhook
1398+
│ └── defaults_validation.go # AttuneDefaults validation
14011399
├── config/
14021400
│ ├── crd/
14031401
│ │ └── bases/ # Generated CRD manifests
@@ -1451,58 +1449,58 @@ attune/
14511449

14521450
### Phase 1: Foundation (MVP)
14531451

1454-
- [ ] Project scaffolding (Kubebuilder)
1455-
- [ ] AttunePolicy CRD (v1alpha1)
1456-
- [ ] Prometheus metrics collector
1457-
- [ ] Percentile-based recommendation engine
1458-
- [ ] Status reporting (recommendations, conditions)
1459-
- [ ] Observe and Recommend modes only (no resize)
1460-
- [ ] Helm chart
1461-
- [ ] Unit tests (75%+ coverage)
1462-
- [ ] envtest integration tests
1463-
- [ ] CI pipeline (lint, test, build)
1464-
- [ ] README with quickstart
1452+
- [x] Project scaffolding (Kubebuilder)
1453+
- [x] AttunePolicy CRD (v1alpha1)
1454+
- [x] Prometheus metrics collector
1455+
- [x] Percentile-based recommendation engine
1456+
- [x] Status reporting (recommendations, conditions)
1457+
- [x] Observe and Recommend modes only (no resize)
1458+
- [x] Helm chart
1459+
- [x] Unit tests (75%+ coverage)
1460+
- [x] envtest integration tests
1461+
- [x] CI pipeline (lint, test, build)
1462+
- [x] README with quickstart
14651463

14661464
### Phase 2: Resize Engine
14671465

1468-
- [ ] In-place resize via /resize subresource
1469-
- [ ] OneShot mode
1470-
- [ ] Canary mode with graduated rollout
1471-
- [ ] Resize status polling and timeout handling
1472-
- [ ] QoS preservation checks
1473-
- [ ] LimitRange/ResourceQuota compatibility
1474-
- [ ] E2E tests (Chainsaw)
1475-
- [ ] Security scanning in CI
1466+
- [x] In-place resize via /resize subresource
1467+
- [x] OneShot mode
1468+
- [x] Canary mode with graduated rollout
1469+
- [x] Resize status polling and timeout handling
1470+
- [x] QoS preservation checks
1471+
- [x] LimitRange/ResourceQuota compatibility
1472+
- [x] E2E tests (Chainsaw)
1473+
- [x] Security scanning in CI
14761474

14771475
### Phase 3: Safety & Intelligence
14781476

1479-
- [ ] Safety monitor (OOMKill, throttle, restart detection)
1480-
- [ ] Auto-revert mechanism
1481-
- [ ] Confidence-based recommendation widening
1482-
- [ ] Time-of-day-aware algorithm
1483-
- [ ] Burst detection
1484-
- [ ] HPA coexistence logic
1485-
- [ ] VPA conflict detection
1486-
- [ ] Policy weight-based conflict resolution
1477+
- [x] Safety monitor (OOMKill, throttle, restart detection)
1478+
- [x] Auto-revert mechanism
1479+
- [x] Confidence-based recommendation widening
1480+
- [x] Time-of-day-aware algorithm
1481+
- [x] Burst detection
1482+
- [x] HPA coexistence logic
1483+
- [x] VPA conflict detection
1484+
- [x] Policy weight-based conflict resolution
14871485

14881486
### Phase 4: Production Readiness
14891487

1490-
- [ ] Auto mode (canary then fleet)
1491-
- [ ] AttuneDefaults / AttuneNamespaceDefaults
1492-
- [ ] Grafana dashboard
1493-
- [ ] MkDocs documentation site
1494-
- [ ] Cosign image signing
1495-
- [ ] SBOM generation
1496-
- [ ] Release automation (GoReleaser)
1497-
- [ ] OCI Helm chart distribution
1498-
- [ ] Fuzz tests
1499-
- [ ] Benchmark tests
1488+
- [x] Auto mode (canary then fleet)
1489+
- [x] AttuneDefaults / AttuneNamespaceDefaults
1490+
- [x] Grafana dashboard
1491+
- [x] MkDocs documentation site
1492+
- [x] Cosign image signing
1493+
- [x] SBOM generation
1494+
- [x] Release automation (GoReleaser)
1495+
- [x] OCI Helm chart distribution
1496+
- [x] Fuzz tests
1497+
- [x] Benchmark tests
15001498

15011499
### Phase 5: Ecosystem
15021500

1503-
- [ ] kubectl plugin (via krew)
1504-
- [ ] Datadog/CloudWatch metrics support
1505-
- [ ] Memory decrease support (with gradual decrease)
1501+
- [x] kubectl plugin (via krew)
1502+
- [x] Datadog/CloudWatch metrics support
1503+
- [x] Memory decrease support (with gradual decrease)
15061504
- [ ] Multi-cluster aggregated reporting
15071505
- [ ] CNCF Sandbox application
15081506
- [ ] KubeCon talk proposal

0 commit comments

Comments
 (0)