Files
aevolution/deploy/kubernetes/stores/base/store-check-job.yaml
T
dingoandClaude Opus 5.5 7318d82a14 Deliver the platform layer and store Jobs through Argo CD
At the maintainer's request everything but Secrets and the store node
label now goes through Argo CD. aevolution-platform syncs one bundle
(World0 admission policy, Retain storage class, each environment's
namespace, guardrails, service accounts and object claim) with
self-heal, no prune and Prune=false,Delete=false on every object; the
admission policy also protects the platform app and project. Store Jobs
become kustomize components used as PreSync (migrate) and PostSync
(check-store) hooks per environment, and the policy check refuses any
unresolved marker in a path an Application syncs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:05:34 -04:00

73 lines
2.5 KiB
YAML

# PostSync hook: qualifies the object volume and the runtime login after each sync
# (evo-world-clone check-store, ADR-0070). Its log is the store evidence.
apiVersion: batch/v1
kind: Job
metadata:
name: aevolution-store-check
labels:
app.kubernetes.io/part-of: aevolution
app.kubernetes.io/component: store-check
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
spec:
backoffLimit: 0
activeDeadlineSeconds: 120
template:
metadata:
labels:
app.kubernetes.io/part-of: aevolution
app.kubernetes.io/component: store-check
spec:
serviceAccountName: aevolution-region
automountServiceAccountToken: false
restartPolicy: Never
nodeSelector:
aevolution.io/stores: "true"
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
seccompProfile: {type: RuntimeDefault}
containers:
- name: check-store
image: aevolution-server
# libpq ignores a group-readable password file, and Secret volumes are
# group-readable for a non-root fsGroup, so copy it to private memory first.
# w1/r1 is a reserved probe namespace, never a real world.
command: ["/bin/bash", "-c"]
args:
- |
set -eu
umask 077
cp /run/postgres/pgpass /tmp/pgpass
exec /usr/local/bin/evo-world-clone check-store --world 1 --region 1 \
--objects /objects --pg-service /run/postgres/pg_service.conf \
--pg-passfile /tmp/pgpass
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: scratch
emptyDir: {medium: Memory, sizeLimit: 1Mi}
- name: connection
secret:
secretName: evolution-postgres-runtime
defaultMode: 0440
items:
- {key: pg_service.conf, path: pg_service.conf}
- {key: pgpass, path: pgpass}
- {key: ca.crt, path: ca.crt}