Add comprehensive acceptance tests for Phase 6 (Horizontal Scaling + HPA)
as specified in plan §14 Definition of Done.
Files added:
- tests/p6_8_multi_pod_acceptance.sh - Full end-to-end test using kind
- tests/verify_p6_8_templates_direct.sh - Template verification without kind
- tests/verify_p6_8_helm_templates.sh - Helm-based template verification
- tests/p6_8_README.md - Documentation for running the tests
Test coverage:
1. Multi-pod deployment (3 replicas)
2. Peer discovery (headless Service + Downward API)
3. Mode B leader election (exactly one leader, failover)
4. Resource-pressure metrics (all §14.9 metrics)
5. PrometheusRule alerts (all §14.9 alerts)
6. HPA configuration (correct metric types: Pods/External)
7. Resource limits (2 vCPU / 3.75 GB envelope)
The template verification script (verify_p6_8_templates_direct.sh) can be
run in any environment and validates:
- HPA template exists with correct metrics and types
- PrometheusRule has all §14.9 alerts
- Headless Service for peer discovery
- Downward API env vars (POD_NAME, POD_NAMESPACE, POD_IP)
- ServiceMonitor for metrics scraping
- values.schema.json HPA validation
Closes: bf-1976
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>