Files
aevolution/deploy/kubernetes/admin-portal-dev/networkpolicy.yaml
T
dingoandClaude Opus 5.5 9b854e6960
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
feat(admin): open a fresh region from the portal (ADR-0182 section 15)
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>
2026-10-28 13:51:36 -04:00

75 lines
2.3 KiB
YAML

# 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,
# 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:
name: evo-admin-portal
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: evo-admin-portal
policyTypes: [Ingress, Egress]
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app.kubernetes.io/name: rke2-ingress-nginx
ports:
- {protocol: TCP, port: 8080}
egress:
- to:
- ipBlock:
cidr: 172.10.1.127/32
ports:
- {protocol: TCP, port: 5432}
- to:
- podSelector:
matchLabels:
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.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: evo-region-admin-view
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: evo-region
policyTypes: [Ingress]
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: evo-admin-portal
ports:
- {protocol: TCP, port: 9100}