feat(admin): open a fresh region from the portal (ADR-0182 section 15)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m31s
Foundation / postgres-tools (push) Successful in 27s
Foundation / server-image (push) Successful in 4m33s
Foundation / image (push) Successful in 5m39s

The Regions page opens the next region in place of the one DEV serves: the
admin API reads the region overlay, its kustomization, the grant broker and the
portal deployment from main at one commit, rewrites only the region id, routes,
genesis commit and seeded wildlife range (refusing files whose layout differs),
commits them in one Gitea multi-file commit as aevolution-bot, then starts a full
Argo sync of exactly that commit. The page follows the sync until the region is
live, across the portal's own restart.

Credentials come from Secret aevolution-admin mounted read-only as files
(--deploy-config); without it the feature stays off. A small OpenSSL HTTPS
client talks to Gitea (verified) and argocd-server (verification per
ARGOCD_TLS_VERIFY). The portal's NetworkPolicy gains egress to the node's
ingress for Gitea and to the argocd-server pods, as approved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-28 13:51:36 -04:00
co-authored by Claude Opus 5.5
parent e0f9512567
commit 9b854e6960
16 changed files with 1317 additions and 14 deletions
@@ -48,7 +48,8 @@ spec:
--role aevolution-admin --assets /usr/local/share/evo-admin-portal \
--pg-service /run/postgres/pg_service.conf --pg-passfile /run/postgres/pgpass \
--baseline-tuning /etc/evo/tuning/cellular-revamp.tuning \
--region-tuning /etc/evo/tuning/cellular.tuning "${regions[@]}"
--region-tuning /etc/evo/tuning/cellular.tuning \
--deploy-config /run/deploy "${regions[@]}"
env:
- {name: ADMIN_WORLD, value: "100"}
# Space-separated REGION=HOST:PORT: each region's operations address for /admin/view.
@@ -81,7 +82,23 @@ spec:
# The revamp tuning file the regions opened with: the portal's baseline until the
# first tuning revision (ADR-0182 section 13); the region tuning file, shown read only.
- {name: tuning, mountPath: /etc/evo/tuning, readOnly: true}
# ADR-0182 section 15: the Gitea and Argo CD settings and tokens that let the portal
# open a region, one file per key; without the Secret that feature stays off.
- {name: deploy, mountPath: /run/deploy, readOnly: true}
volumes:
- name: deploy
secret:
secretName: aevolution-admin
optional: true
defaultMode: 0440
items:
- {key: GITEA_BASE_URL, path: GITEA_BASE_URL}
- {key: GITEA_REPOSITORY, path: GITEA_REPOSITORY}
- {key: GITEA_TOKEN, path: GITEA_TOKEN}
- {key: ARGOCD_SERVER, path: ARGOCD_SERVER}
- {key: ARGOCD_APPLICATION, path: ARGOCD_APPLICATION}
- {key: ARGOCD_TOKEN, path: ARGOCD_TOKEN}
- {key: ARGOCD_TLS_VERIFY, path: ARGOCD_TLS_VERIFY}
- name: tuning
configMap:
name: cellular-tuning
@@ -1,7 +1,9 @@
# Admin portal traffic on top of the namespace default-deny. Admins reach it only at
# https://srs.aeternalisgames.com on 443, where ingress-nginx terminates TLS; port 8080 is
# admitted from the ingress-nginx pods and nothing else. Egress: PostgreSQL on pg-forge-01
# and the region's operations port (9100) for /admin/view.
# admitted from the ingress-nginx pods and nothing else. Egress: PostgreSQL on pg-forge-01,
# the region's operations port (9100) for /admin/view, and for opening a region (ADR-0182
# section 15, approved 2026-10-28) Gitea through the node's ingress (git.aeternalisgames.com,
# 172.10.1.160:443) and the argocd-server pods (8080, behind the Service's 443).
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
@@ -35,6 +37,20 @@ spec:
app.kubernetes.io/name: evo-region
ports:
- {protocol: TCP, port: 9100}
- to:
- ipBlock:
cidr: 172.10.1.160/32
ports:
- {protocol: TCP, port: 443}
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: argocd
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-server
ports:
- {protocol: TCP, port: 8080}
---
# The region's operations port also admits the admin portal (alongside Prometheus,
# evo-region-scrape). Only 9100: never the session port.