- shakedown_lib: runs F01 -> F02 -> F03 for one engagement on KAB with no personal token. Signs in as the kab-automation client (client credentials, provisioned by Stellwerk from crucible-platform-deploy) and renews the token itself. - Each stage checks its workflow id against the registered sub-agent name, builds inputs from the case and upstream stages, starts the run, follows it and judges it with cp1-agents evaluate_case.py. - Gates (plan 5b): in config/runner.yaml gate_projects only, continue on a critic pass with no failed step and a note saying the system decided. Never on a fail. Elsewhere, wait for a person and record who decided. gate_projects is empty for now. - Ledger per voyage run, with --resume; nothing secret is written. - Cymbal voyage ENG-CYMBAL-001; workflow registry; Dockerfile and an unapplied Job template; 15 tests against a fake KAB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
2.5 KiB
YAML
53 lines
2.5 KiB
YAML
# One voyage run as a Kubernetes Job in namespace `shakedown`. A template: placeholders are filled at render time,
|
|
# and nothing here is applied without the owner's approval.
|
|
#
|
|
# Provisioned outside this repository by the Stellwerk orchestrator (crucible-platform-deploy, kab-cluster/dev):
|
|
# - the `shakedown` namespace and the PVC `shakedown-ledger`;
|
|
# - Secret `shakedown-kab-automation`, key `client-secret`: the kab-automation client's secret, from Key Vault
|
|
# crucible-kab-dev-kv `kab-automation-client-secret`. The runner reads it from the environment only;
|
|
# - Secret `shakedown-gitea-read`, key `token`: read access to agents/cp1-agents, for the pinned clone.
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
generateName: shakedown-voyage-
|
|
namespace: shakedown
|
|
labels: {app.kubernetes.io/name: shakedown-runner, app.kubernetes.io/part-of: cp1-shakedown}
|
|
spec:
|
|
backoffLimit: 0 # a failed run is resumed on purpose (--resume), never retried blind
|
|
activeDeadlineSeconds: 172800 # two days: three stages plus waiting for people at review points
|
|
template:
|
|
metadata:
|
|
labels: {app.kubernetes.io/name: shakedown-runner}
|
|
spec:
|
|
restartPolicy: Never
|
|
securityContext: {runAsNonRoot: true, runAsUser: 10001, fsGroup: 10001}
|
|
initContainers:
|
|
- name: clone-cp1-agents
|
|
image: <placeholder_for_runner_image>
|
|
command: ["sh", "-c"]
|
|
args:
|
|
- >-
|
|
git -c http.extraHeader="Authorization: token $GITEA_TOKEN" clone --quiet
|
|
https://gitea.kyndemo.live/agents/cp1-agents.git /cp1-agents &&
|
|
git -C /cp1-agents checkout --quiet <placeholder_for_cp1_agents_commit>
|
|
env:
|
|
- name: GITEA_TOKEN
|
|
valueFrom: {secretKeyRef: {name: shakedown-gitea-read, key: token}}
|
|
volumeMounts: [{name: cp1-agents, mountPath: /cp1-agents}]
|
|
containers:
|
|
- name: runner
|
|
image: <placeholder_for_runner_image>
|
|
args: ["run", "<placeholder_for_voyage_file>"]
|
|
env:
|
|
- name: KAB_CLIENT_SECRET
|
|
valueFrom: {secretKeyRef: {name: shakedown-kab-automation, key: client-secret}}
|
|
resources:
|
|
requests: {cpu: 50m, memory: 128Mi}
|
|
limits: {cpu: 500m, memory: 512Mi}
|
|
volumeMounts:
|
|
- {name: cp1-agents, mountPath: /cp1-agents, readOnly: true}
|
|
- {name: ledger, mountPath: /ledger}
|
|
volumes:
|
|
- {name: cp1-agents, emptyDir: {}}
|
|
- {name: ledger, persistentVolumeClaim: {claimName: shakedown-ledger}}
|