Ga naar hoofdinhoud

Convergence

The game's site and its RPG demo with the server-authoritative game server (MWest2020/convergence), devnet only. Argo CD app convergence (sync-wave 7, after the tailscale-operator), manifests in cluster-config/infra/convergence/.

Shape​

One pod, two containers, both pinned by digest:

  • web: nginx on :8080; the site at /, and /play-rpg/, /parties/ (HTTP and WebSocket) and /healthz proxied to the rpg container. /play and /play/ redirect to /play-rpg/. Site, demo and WebSocket share one origin.
  • rpg: the RPG-JS game server on 127.0.0.1:8790 (the demo's client under /play-rpg/, its transport under /parties, /healthz). The game state lives in the process, so one replica and Recreate. It needs a writable /tmp (HOME=/tmp, an emptyDir). A liveness probe on /healthz (every 20 s, three misses) restarts the container when the process dies or hangs; a restart starts the game world fresh.

The first demo's server container (/ws, :8787, the game at /play/) was retired on 2026-11-11.

Both containers run non-root with a read-only root filesystem and all capabilities dropped; nginx gets an emptyDir on /tmp for its pid file.

Access​

  • Public: https://convergence.westerweel.work through the Cloudflare tunnel convergence (remotely managed; ingress rule and CNAME created by API on 2026-10-25). The cloudflared pods carry their own label (app: convergence-tunnel): the game Service selects app: convergence.
  • Funnel: https://convergence.<tailnet>.ts.net is configured but not public: the tailnet ACL does not grant tag:k8s the funnel node attribute, so the name has no public DNS (netnl's Funnel has the same gap). Fix, tailnet admin only: "nodeAttrs": [{"target": ["tag:k8s"], "attr": ["funnel"]}].

Deploy a new build​

The convergence repository's image workflow pushes ghcr.io/mwest2020/convergence-{web,rpg}:sha-<commit> on main. Update both digests in deployment.yaml; Argo CD rolls the pod. Because of Recreate, a rollout is a short outage and resets the game world.

Verify​

kubectl -n convergence get pods # convergence 2/2, convergence-tunnel ×2
kubectl -n convergence logs -l app=convergence-tunnel --tail=20
curl -sI https://convergence.westerweel.work/ # 200 from nginx
curl -s https://convergence.westerweel.work/healthz # "ok" from the rpg container, through nginx
curl -sI https://convergence.westerweel.work/play # 301 to /play-rpg/

The tunnel uses the same construction as netnl's: two cloudflared replicas (anti-affinity preferred), DNS over TCP and --protocol http2 instead of QUIC. An HTTP 530 means no connector is up; see HTTP 530 op api.westerweel.work in the runbooks index.

Out-of-band​

The packages are private, so the namespace needs the ghcr-pull secret, copied from agents (command in cluster-config/infra/convergence/README.md; jumpy has no jq, so it uses python3). Without it the pod stays in ImagePullBackOff. The tunnel token is the out-of-band Secret convergence-tunnel.

Devnet (shards on chain)​

Since 2026-11-14 the rpg container settles the shard ledger on Solana devnet (convergence#161, decision 0005 there). Never mainnet: the server asks the RPC for its genesis hash and refuses any cluster that is not devnet.

WhatValue
CV_CHAINdevnet (plain env)
CV_SHARD_MINTETxmwLYgu8tRNeDNodgDUj5SzCoAqmqsovY46aEhXPuX (plain env; made by npm run devnet:setup on 2026-11-14)
CV_AUTHORITY_KEYSecret convergence-devnet-authority, key authority (out-of-band)
Authority (public)HV8MjgB8b725dE3urVFxtKQmED6QQdmknDwJqhzgnShB, funded by Mark at faucet.solana.com
BackupOpenBao kv/convergence/devnet-authority (see key backups); working copy on the agent host in ~/.config/convergence/

Check: the rpg log says chain: devnet, authority ..., mint ...; the wallet panel on /play-rpg/ shows the devnet badge. Balance and history: https://explorer.solana.com/address/HV8MjgB8b725dE3urVFxtKQmED6QQdmknDwJqhzgnShB?cluster=devnet. When the authority runs out of SOL, sends fail with "insufficient funds" and the game goes on in memory; a person funds it again at faucet.solana.com (the devnet RPC faucet is closed). To turn devnet off, drop CV_CHAIN. Recreating the Secret: cluster-config/infra/convergence/README.md.