Files
aevolution/deploy/kubernetes/region/base/provision-job.yaml
T
dingoandClaude Opus 5.5 b923ce1721 deploy(dev): serve a cellular region 100/2 for the M11.3 probe
Region 100/1 holds lineage history and cannot host the cellular profile,
so dev provisions a fresh cellular-v1 genesis at region 2 and serves it
with --profile cellular and its --life-route catalog. Region 1's stores
are left untouched; it is no longer served.

The base Deployment and provision Job take REGION_PROFILE,
REGION_LIFE_ROUTES, REGION_OPENING and REGION_OPENING_ARGS. Their
defaults keep stage on the lineage profile with the development opening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:23:52 -04:00

84 lines
3.2 KiB
YAML

# Sync hook at wave 0: after the database egress policy (wave -2) and the migration
# (wave -1), before the region host (wave 1). Creates the region's genesis from
# the development opening once, with the migrator (owner) login, and records the
# server image digest as a retained build. Every later sync reports
# "already-provisioned" and changes nothing.
apiVersion: batch/v1
kind: Job
metadata:
name: aevolution-region-provision
labels:
app.kubernetes.io/component: migrate
annotations:
argocd.argoproj.io/hook: Sync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
argocd.argoproj.io/sync-wave: "0"
spec:
backoffLimit: 0
activeDeadlineSeconds: 120
template:
metadata:
labels:
app.kubernetes.io/component: migrate
app.kubernetes.io/part-of: aevolution
spec:
serviceAccountName: aevolution-migrator
automountServiceAccountToken: false
restartPolicy: Never
nodeSelector:
aevolution.io/stores: "true"
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
seccompProfile: {type: RuntimeDefault}
containers:
- name: provision
image: aevolution-server
command: ["/bin/bash", "-c"]
args:
- |
set -eu
umask 077
cp /run/postgres/pgpass /tmp/pgpass
# cellular-v1 needs its explicit opening (frame, funding, sites, patches,
# stable commit) as whitespace-free words in REGION_OPENING_ARGS.
opening=(--opening "$REGION_OPENING")
for word in $REGION_OPENING_ARGS; do opening+=("$word"); done
exec /usr/local/bin/evo-world-clone provision \
--world "$REGION_WORLD" --region "$REGION_ID" "${opening[@]}" \
--pg-service /run/postgres/pg_service.conf --pg-passfile /tmp/pgpass \
--objects /objects --build "$REGION_BUILD" --retain-build true
env:
- {name: REGION_WORLD, value: set-by-overlay}
- {name: REGION_ID, value: set-by-overlay}
- {name: REGION_BUILD, value: set-by-overlay}
- {name: REGION_OPENING, value: development-v1}
- {name: REGION_OPENING_ARGS, value: ""}
resources:
requests: {cpu: 50m, memory: 64Mi}
limits: {memory: 256Mi}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: {drop: [ALL]}
volumeMounts:
- {name: objects, mountPath: /objects}
- {name: connection, mountPath: /run/postgres, readOnly: true}
- {name: scratch, mountPath: /tmp}
volumes:
- name: objects
persistentVolumeClaim:
claimName: aevolution-objects
- name: connection
secret:
secretName: evolution-postgres-migrator
defaultMode: 0440
items:
- {key: pg_service.conf, path: pg_service.conf}
- {key: pgpass, path: pgpass}
- {key: ca.crt, path: ca.crt}
- name: scratch
emptyDir: {medium: Memory, sizeLimit: 1Mi}