Skip to content

Preview Environments
That Just Work

Open-source environment-as-a-service for Kubernetes. Delta deployments. Serverless scale-to-zero. Header-based routing. Local hot-reload.
Diverge CLI Quickstart Terminal Session
Traditional Full-Stack Duplication vs. Diverge Delta Preview
Traditional Environment Clones
Full Cluster Duplication
  • ❌ Clones all 50 microservices for a 1-line code change
  • ❌ 15–20 minutes pipeline wait time per review
  • ❌ ~$47/day per active PR in idle cluster compute
  • ❌ Complex wildcard DNS, cert management, and port collisions
  • ❌ Orphaned environments draining cloud budgets indefinitely
The Diverge Way
Delta Routing & Zero Idle Cost
  • ⚡️ Deploys only the service that changed
  • ⚡️ 45 seconds from pull request open to live preview
  • ⚡️ Idle previews scale to zero (~$15/mo for 50 PRs)
  • ⚡️ Dynamic routing via a single HTTP header over Istio/Gateway API
  • ⚡️ Guaranteed finalizer teardown on PR merge + automated TTL

Autonomous Agent Sandboxes

Run AI coding agents (AgentTask) inside network-isolated Kubernetes sandboxes with attenuated Macaroon capability tokens, automatic linked preview environments, and live LLM cost/token metering (POST /api/v1/agenttask/meter).

Delta Deployments

Deploy only the services that changed. Diverge analyzes commit diffs to pinpoint impacted services and shares baseline dependencies for everything else.

Scale-to-Zero & Wake Splash

Idle PR previews scale to zero via Knative or KEDA and hibernate after idle timeouts. The Activator proxy serves a browser-friendly wake-up splash page (--wake-splash) during cold starts.

Interactive PR/MR Slash Commands

Manage environments, steer agents, and adjust budgets directly from GitHub/GitLab comments with /diverge preview, /diverge fix, /diverge guide, /diverge budget, /diverge pause, /diverge resume, /diverge status, and /diverge teardown.

Header & Subdomain Routing

Route traffic to your preview environment with a single HTTP header or dedicated wildcard subdomain. Works natively with Istio, Envoy, Gateway API, and ConnectRPC.

Atlas Schema Management

Automate database migrations and declarative schema isolation (preview_<env>) for each preview environment with Ariga Atlas via standalone K8s Jobs or Atlas Operator.

Built-in MCP Server & Web UI

Connect Claude Code, Cursor, or VS Code via /mcp or diverge mcp, and visualize topologies, logs, and cost estimates (diverge_environment_estimated_hourly_cost_usd) in the embedded React dashboard.

Security-Hardened Architecture

Macaroon capability auth, OIDC SSO, RFC 7230 header validation, non-root execution, read-only root filesystems, dropped capabilities, and constant-time secret evaluation.

Pluggable Provider Registry

Extensible provider interface for routing (Istio, Gateway API), deployers (Argo CD, Direct, Knative), sandboxes (agent-sandbox, pod / k8s-pod), feature flags (flipt, unleash), async/storage (kafka, temporal, redis/valkey, s3/gcs/minio), and databases (Postgres, Atlas, Neon, CNPG, CockroachDB).

# .diverge.yaml — add to your repository root (or run `diverge init --config`)
version: "1"
services:
api:
paths: ["services/api/**"]
image:
repository: registry.example.com/api
tag_template: "mr-{{.MR}}"
helm:
path: charts/api
web:
paths: ["apps/web/**"]
image:
repository: registry.example.com/web
tag_template: "mr-{{.MR}}"
helm:
path: charts/web
defaults:
deploy:
mode: delta # Only deploy services with code changes
routing:
mode: header # Route via x-diverge-env header
baseline_namespace: staging
banner:
enabled: true # Injects preview banner in browser responses
database:
mode: schema # Ephemeral schema isolation
atlas:
mode: versioned # Runs Atlas migration job on PR open
engine: job
migration_config_map: app-migrations
lifecycle:
ttl: 72h
cleanup_on_merge: true
45s
Average deployment time for PR preview environments in delta mode.
~$15/mo
Compute cost for 50 PRs using Knative scale-to-zero (down from ~$1,200/mo).
0
Zombie environments. Finalizer cleanup on merge + automated TTL expiry.
1 Header
All it takes to route mesh traffic directly to your preview changes.
  • Kubernetes-native — 100% CRD-driven (Environment, PreviewGroup, AgentTask), compatible with any CNCF-certified Kubernetes cluster
  • Autonomous AI Ready — Built-in MCP server (/mcp & diverge mcp), Macaroon capability tokens, and live LLM cost/token metering
  • GitOps First — Native integration with Argo CD Application CRs using Server-Side Apply
  • Standalone Direct Mode — DirectDeployer applies manifests natively without requiring Argo CD
  • Kustomize & Helm — Native support for both packaging formats
  • Service Mesh Agnostic — Gateway API, Istio, Linkerd, Cilium, or NGINX Ingress
  • Protocol Telemetry — HTTP/1.1, HTTP/2, gRPC, and ConnectRPC with SDK interceptors and hourly cost estimation metrics
  • Git Provider Automation — Bi-directional webhooks, interactive /diverge slash commands, and MR/PR commit statuses for GitHub & GitLab
  • Local Dev Loop — diverge dev hot-reloads local processes directly into remote cluster routing
  • Enterprise Security — OIDC SSO, Macaroon capability auth, non-root distroless containers, PSS Restricted profiles, Cosign-signed images