This repository owns how the Solid Stats application images are composed into a working staging runtime. Application repositories own application source code and container image builds; this repository owns the runtime wiring in staging.
See staging.md for staging operations, the deploy host, required
GitHub environment secrets, and the Staging Handoff Matrix (the boundary between
the app repositories that build images and this repository that deploys staging
runtime wiring). For remote kubectl from a workstation, see
k3s-api-access.md.
The GitHub Actions workflow (.github/workflows/deploy-staging.yml) deploys on
pushes to master, and can be run manually with workflow_dispatch.
On merge to master the workflow:
- Opens an SSH local-forward to the closed k3s API (
scripts/ssh-tunnel-up.sh,127.0.0.1:16443-> k3s API6443), fail-closed gating on the forwarded port being reachable before anykubectl. - Builds a kubeconfig from the
ci-deployerServiceAccount token and k3s CA (scripts/kubeconfig-setup.sh). - Applies
k8s/staging/, excluding the operator-managed01-ci-rbac.yaml. - Waits for
statefulset/postgres,statefulset/rabbitmq,deployment/server-2, anddeployment/replay-parser-2. - Lists the
postgres,rabbitmq, andserver-2Services plus thereplays-fetcherandpostgres-backupCronJobs.
Validate the staging manifests, scripts, and rendered Secret structure before deploy:
python3 scripts/validate-staging.pyPhase 1 owns the namespace, PostgreSQL, RabbitMQ, server-2, replay-parser-2,
the suspended replays-fetcher, and postgres-backup.
Out of this phase: production cutover, host edge automation, application
source/image builds, immediate legacy deploy removal, scheduled replay fetching,
backup gate execution, full run, diff readiness, and the future web runtime.
After the staging manifests are applied:
K8S_NAMESPACE=solid-stats-staging ./scripts/backup-postgres-now.shThe job creates and waits for a one-off backup from the deployed backup CronJob,
writing a PostgreSQL custom-format dump, restore list, and JSON manifest under
the configured S3 bucket prefix backups/postgres/. See
backup-restore.md for the full backup and restore runbook.