# 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}