ADR-002: Feature Branch Strategy
Context
Development teams need isolated environments for testing features without impacting shared dev environment. Creating/destroying these environments must be self-service.
Decision
Implement dynamic feature branch environments using:
-
Naming convention:
feature-<ticket-id> -
Automated creation via script
-
ArgoCD applications with 7-day TTL
-
Minimal resource allocation
-
Automatic cleanup after expiry
./scripts/create-feature-env.sh TICKET-123 mysql
# Creates: namespace=feature-ticket-123
# ArgoCD app=feature-ticket-123
# Ingress=feature-ticket-123.rd.friendly-tech.com
Consequences
Implementation Details
-
Resource quotas limit feature branch resources
-
TTL annotations trigger auto-cleanup
-
Reduced replicas and resource limits vs dev
-
Network policies isolate namespaces
-
Shared ArgoCD project manages all feature apps
Alternatives Considered
-
Shared dev environment - Rejected, too many conflicts
-
Long-lived staging environments - Rejected, not enough for all teams
-
Local docker-compose only - Rejected, doesn’t match production
-
VM per feature - Rejected, too slow to provision