Files
aevolution/deploy/kubernetes/grant-broker-dev/deployment.yaml
T
dingoandClaude Opus 5.5 848c03b49f
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 3s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m56s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Serve DEV region 8: pools and bubbles on a 30 x 30 mm arena (ADR-0136 step A)
Promotes server 81515351 and postgres-tools bc5bf591 (schema v43) from the CI run for
be69cae; build 21507d43, which wrote region 7, stays retained. The region host,
provision Job, life routes and grant broker move to region 100/8, a cellular-v7 opening
(rules 8): 30 x 30 mm with region 7's total food, half in 9 pools of 500 um radius and
half in 1,800 single-nutrient bubbles scattered from the genesis commit, a 64-founder
nursery and 9 spawn sites. Region 7 stays in the stores, unserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 02:21:44 -04:00

96 lines
4.5 KiB
YAML

# ADR-0131 grant broker. One replica: serials are ordered by the database, but the
# per-account rate limit lives in the process. The realm's public signing key is
# pinned below (BROKER_JWKS); a Keycloak key rotation needs a Git update here.
apiVersion: apps/v1
kind: Deployment
metadata:
name: evo-grant-broker
annotations:
argocd.argoproj.io/sync-wave: "2" # After migration (schema v39).
labels:
app.kubernetes.io/name: evo-grant-broker
app.kubernetes.io/component: grant-broker
spec:
replicas: 1
revisionHistoryLimit: 3
progressDeadlineSeconds: 180
selector:
matchLabels:
app.kubernetes.io/name: evo-grant-broker
template:
metadata:
labels:
app.kubernetes.io/name: evo-grant-broker
app.kubernetes.io/component: grant-broker
app.kubernetes.io/part-of: aevolution
spec:
serviceAccountName: aevolution-grant-broker
automountServiceAccountToken: false
terminationGracePeriodSeconds: 10
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
seccompProfile: {type: RuntimeDefault}
containers:
- name: evo-grant-broker
image: aevolution-server
command: ["/bin/bash", "-c"]
args:
- |
set -eu
routes=()
for route in $BROKER_ROUTES; do routes+=(--route "$route"); done
exec /usr/local/bin/evo-grant-broker --listen 0.0.0.0:8080 --world "$BROKER_WORLD" --frame "$BROKER_FRAME" --default-region "$BROKER_DEFAULT_REGION" "${routes[@]}" --issuer-key /run/grant-issuer/issuer.key --jwks "$BROKER_JWKS" --oidc-issuer "$BROKER_OIDC_ISSUER" --audience aevolution-grants --client aevolution-game --grant-lifetime "$BROKER_GRANT_LIFETIME" --pg-service /run/postgres/pg_service.conf --pg-passfile /run/postgres/pgpass
env:
- {name: BROKER_WORLD, value: "100"}
- {name: BROKER_FRAME, value: "9"}
# New accounts start here; an account with a live life goes to its region.
- {name: BROKER_DEFAULT_REGION, value: "8"}
# Space-separated REGION=HOST:PORT=TLS_NAME, every region a grant may name.
- {name: BROKER_ROUTES, value: "8=void.aeternalisgames.com:7400=void.aeternalisgames.com"}
# Must not exceed the region's REGION_M10_MAX_GRANT_LIFETIME.
- {name: BROKER_GRANT_LIFETIME, value: "600"}
- {name: BROKER_OIDC_ISSUER, value: "https://auth.aeternalisgames.com/realms/aeternalis"}
# Public RS256 signing key(s) of realm aeternalis, from its JWKS endpoint.
- name: BROKER_JWKS
value: '{"keys":[{"alg":"RS256","e":"AQAB","kid":"NGQG4QzQuBCIHVEomUPy-OoWOTVQIuyf3RXqeNbP8JI","kty":"RSA","n":"vvOpu1xxdyH_mB8LkJG6cwc6UVmmAj6mwQi1oEwrpJDLerBI2OZr2kpgMAUJ3-hMIkz5tRtSjHieMFteVrpDDQaCViIPCIvJTL3T7ujTGFNReSE6ho7h0DB_kybFeEWVpLqm6SSXWFYls5TKo6_t8Hw4G3njiRW9pX_NxyaBHqLkrCi63EyIGHOkdgUczg2d4pM4JTt-q25bcFSlYz8bhD3WEORQmbp-bU7aPPluCqCEAZRrbzf8Iy7svNemP5daDdlWQ3LaNy-ixC2HRjiPZdqK5BgAE800BigI-l1dkyJ4X172TLIPVPLW1WKlvdm3kHOpBXwACYiy8boSNDW7gQ","use":"sig"}]}'
ports:
- {name: http, containerPort: 8080, protocol: TCP}
readinessProbe:
httpGet: {path: /healthz, port: http}
periodSeconds: 5
timeoutSeconds: 1
livenessProbe:
httpGet: {path: /healthz, port: http}
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
resources:
requests: {cpu: 10m, memory: 16Mi}
limits: {memory: 64Mi}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: {drop: [ALL]}
volumeMounts:
- {name: connection, mountPath: /run/postgres, readOnly: true}
- {name: issuer, mountPath: /run/grant-issuer, readOnly: true}
volumes:
- name: connection
secret:
secretName: aevolution-grant-broker-pg
defaultMode: 0440
items:
- {key: pg_service.conf, path: pg_service.conf}
- {key: pgpass, path: pgpass}
- {key: ca.crt, path: ca.crt}
- name: issuer
secret:
secretName: aevolution-grant-issuer
defaultMode: 0440
items:
- {key: issuer.key, path: issuer.key}