23

Staging EKS as the Production Rehearsal

Prove a production-shaped release in an isolated account without sharing production authority or data.

System map · Day 23

Whole-system design

Five stable layers. Today's work is expanded and linked; the rest stays in context.

Product and authority

Covered — People and product entry points · Identity and policy · HelixWorks control plane · Generated application plane

Delivery and desired state

Covered — CI and immutable artifacts

Git desired state

Source-backed today

Promotes the same immutable artifact through the staging overlay rather than rebuilding it for rehearsal.

Argo CD reconciliation

Source-backed today

Reconciles only the staging overlay into its environment-local Kubernetes API.

Cloud and orchestration

Covered — Terraform and AWS APIs · Accounts, VPC, DNS, and private paths

Kubernetes or EKS control plane

Source-backed today

Provides a production-shaped but separately owned API and controller boundary for failure testing.

Compute and traffic

Covered — Worker compute · Platform service workloads · Generated app workloadsAhead — Ambient mesh data plane

Storage and evidence

Covered — Infrastructure state · Cluster desired and live state · Product data and artifacts

Evidence and observability

Source-backed today

The rehearsal requires rollout, denial, recovery, and unaffected-control evidence before production approval.

The enterprise problem and today’s slice

Enterprise problem: A release that passed dev can fail under production-shaped policy, topology, or migration constraints, and calling dev “staging” hides that risk. Whole-course context: The incoming dev chapter defines evidence but does not fabricate it; today allows promotion only after real dev proof exists. Today’s slice: The public stack names helixworks-forge-staging, and its overlay is intentionally blocked-unpinned until scripts/promote-release.py replaces its five image references with real ECR digests—including the inherited zero-replica broker whose cloud responsibility runs on SNS/SQS. Promotion changes immutable image references only; separate controllers and probes must establish policy, capacity, rollout, and product readiness. End-of-day evidence: Only a real isolated-account apply and rehearsal can produce the dossier. Still unsolved: Without AWS credentials, durable Secrets, digests, and connected-network access, staging remains a fail-closed design rather than a deployed environment.

Customer outcome and implementation focus

The customer outcome is a reviewable staging eks as the production rehearsal change, not a collection of requirements. This day starts with the implementation boundary, then uses the command or manifest below to produce positive, denied, and recovery evidence.

Components in focus

Staging EKS control plane, Argo CD, CI promotion gate, and backup/restore controller; account-local nodes/pods; staging state backend, etcd snapshots, registry, and evidence objects; cache: not involved.

This map names the implementation boundary for this day. The service or controller changes only the state it owns; runtime and audit evidence let the operator distinguish a declared change from an effective one.

Rehearse staging promotion and recovery

Run the bounded rehearsal

A failure script that selects the first matching pod can damage the wrong workload, so validate a single owned target first. Run this labelled snippet from the public helixworks-kubernetes-lab monorepo using stable path gitops/apps/forge/overlays/staging.

: "${AWS_PROFILE:?set the approved AWS profile}" "${AWS_REGION:?set the intended AWS region}" "${EXPECTED_ACCOUNT_ID:?set the intended 12-digit AWS account}"
actual_account="$(aws --profile "$AWS_PROFILE" --region "$AWS_REGION" sts get-caller-identity --query Account --output text)"
[ "$actual_account" = "$EXPECTED_ACCOUNT_ID" ] || { echo "AWS account mismatch" >&2; exit 1; }
aws --profile "$AWS_PROFILE" --region "$AWS_REGION" sts get-caller-identity
aws --profile "$AWS_PROFILE" --region "$AWS_REGION" eks update-kubeconfig --name helixworks-forge-staging --alias helixworks-forge-staging
kubectl --context helixworks-forge-staging kustomize gitops/apps/forge/overlays/staging > /tmp/forge-staging.yaml
./scripts/verify-release.sh staging
kubectl --context helixworks-forge-staging -n helixworks-forge rollout status deployment --all --timeout=180s
kubectl --context helixworks-forge-staging -n helixworks-forge port-forward service/control-plane 18080:8080
# In another terminal: FORGE_URL=http://127.0.0.1:18080 FORGE_TOKEN="${FORGE_TOKEN:?set the explicit bearer token}" ./scripts/smoke-product.sh

The explicit context prevents a local or dev cluster from masquerading as staging; the explicit port-forward and FORGE_URL prevent the smoke script’s localhost default from masquerading as cloud proof.

Three authorization planes and lifecycle rule

A staging release role does not become a production deployer or generated-app administrator. The provider plane owns release candidates and approvals; the hosted-runtime plane owns staging artifacts, cluster, secrets, network, and deployments; generated applications own their test tenants, users, sessions, and data rules.

Decision rule: staging proves the artifact and procedure; production grants remain independently approved and revocable. Erase staging tenant data after its retention period without deleting immutable release and recovery evidence.

Key takeaways

Staging is a falsification environment, not a waiting room for production.

  • Promote the digest, not a rebuilt image.
  • Match production contracts while isolating account, cluster, state, and data.
  • Rehearse one bounded failure, recovery, and unaffected control.

Checklist

The rehearsal is launch-worthy only when it can reject a bad candidate.

  • [ ] Staging account and cluster are distinct from dev and production
  • [ ] Digest matches the dev evidence exactly
  • [ ] Migration, lifecycle, denial, failure, and recovery are observed
  • [ ] Synthetic staging data has deletion evidence