# M7.8 development region server (ADR-0066). NOT in the active Argo kustomization. # Before applying to evolution-dev: pin the server image digest, provision the region # (owner-only), create the runtime Secret and object PVC, and add DB/DNS egress for # the real endpoint. Never target World0 from this example. # # Authority, not liveness, gates traffic: /readyz is 200 only while this pod holds # the region lease and has recovered and verified the committed head. /livez only # says the loop is responding. A probe can wait up to one bounded I/O step (commit # deadline 5 s), so probe timeouts below exceed it. # # There is no gateway yet: stdin is not attached, so the region hosts authority but # receives no inputs (tick debt grows by design; nothing is invented). apiVersion: apps/v1 kind: Deployment metadata: name: evolution-region-7-1 namespace: evolution-dev labels: {app.kubernetes.io/name: evolution-region, evolution.aeternalis/region: "7-1"} spec: replicas: 1 strategy: {type: Recreate} # Never two pods racing; the lease still arbitrates. selector: matchLabels: {app.kubernetes.io/name: evolution-region, evolution.aeternalis/region: "7-1"} template: metadata: labels: {app.kubernetes.io/name: evolution-region, evolution.aeternalis/region: "7-1"} spec: automountServiceAccountToken: false terminationGracePeriodSeconds: 30 # SIGTERM drains within --drain-ms 20000. securityContext: runAsNonRoot: true runAsUser: 10001 runAsGroup: 10001 fsGroup: 10001 seccompProfile: {type: RuntimeDefault} initContainers: # libpq rejects group-readable password files: copy to a private 0600 file. - name: pgpass image: registry.aeternalisgames.com/aeternalis/aevolution-server:replace-with-immutable-digest command: ["/bin/sh", "-c", "install -m 0600 /run/postgres/pgpass /run/evo/pgpass"] securityContext: {readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, capabilities: {drop: [ALL]}} volumeMounts: - {name: connection, mountPath: /run/postgres, readOnly: true} - {name: private, mountPath: /run/evo} containers: - name: region image: registry.aeternalisgames.com/aeternalis/aevolution-server:replace-with-immutable-digest # Flags are "--name value" pairs; see docs/infrastructure/POSTGRESQL.md. command: - /usr/local/bin/evo-server - --profile - lineage - --world - "7" - --region - "1" - --frame - "9" - --pg-host - replace-with-tls-hostname - --pg-hostaddr - replace-with-numeric-address - --pg-port - "5432" - --pg-database - evolution - --pg-user - replace-with-runtime-login - --pg-passfile - /run/evo/pgpass - --pg-ca - /run/postgres/ca.crt - --objects - /var/lib/evolution/objects - --build - replace-with-retained-build-identity-hex - --ops-listen - 0.0.0.0:9100 - --drain-ms - "20000" ports: - {name: ops, containerPort: 9100} startupProbe: httpGet: {path: /livez, port: ops} periodSeconds: 5 timeoutSeconds: 8 failureThreshold: 12 readinessProbe: httpGet: {path: /readyz, port: ops} periodSeconds: 5 timeoutSeconds: 8 failureThreshold: 1 # Any doubt about authority removes the pod at once. livenessProbe: httpGet: {path: /livez, port: ops} periodSeconds: 10 timeoutSeconds: 8 failureThreshold: 6 resources: requests: {cpu: 250m, memory: 128Mi} limits: {cpu: "1", memory: 512Mi} securityContext: readOnlyRootFilesystem: true allowPrivilegeEscalation: false capabilities: {drop: [ALL]} volumeMounts: - {name: connection, mountPath: /run/postgres, readOnly: true} - {name: private, mountPath: /run/evo, readOnly: true} - {name: objects, mountPath: /var/lib/evolution/objects} - {name: scratch, mountPath: /tmp} volumes: - name: connection secret: secretName: evolution-postgres-runtime # Runtime login only; never migrator. defaultMode: 0440 items: - {key: pgpass, path: pgpass} - {key: ca.crt, path: ca.crt} - name: private emptyDir: {medium: Memory, sizeLimit: 1Mi} - name: objects persistentVolumeClaim: {claimName: evolution-region-objects} - name: scratch emptyDir: {medium: Memory, sizeLimit: 8Mi} --- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: evolution-region-7-1 namespace: evolution-dev spec: podSelector: matchLabels: {app.kubernetes.io/name: evolution-region, evolution.aeternalis/region: "7-1"} policyTypes: [Ingress, Egress] ingress: # Metrics/probes only from the monitoring namespace (kubelet probes use the node). - from: - namespaceSelector: matchLabels: {kubernetes.io/metadata.name: monitoring} ports: [{port: 9100, protocol: TCP}] egress: # Replace with the actual database endpoint; no DNS is needed with a numeric hostaddr. - to: [{ipBlock: {cidr: 192.0.2.10/32}}] ports: [{port: 5432, protocol: TCP}]