Review and approve from the terminal
Development preview. Install the controller, runner, and CRDs from the same revision as described in the composable lab. Native Argo approval is the default. To enable approval from the terminal, edit manual/workflow.yaml:
- In
spec.arguments.parameters, setapproval-modetomanaged. Adjustapproval-ttlfor a shorter lab window if needed. - In
plan.container.env, setPUBLISH_REVIEWto"true". Add{name: plan-review-text, path: /tmp/plan.txt, archive: {none: {}}}underplan.outputs.artifacts. - To require a ticket, set
require-chgto"true"and addchgto theapprovalinputs and outputs following the contract example in GitHub. Omit it otherwise. - Configure a private Argo artifact repository, retain the evidence past the approval deadline, and reapply the lab with
kubectl apply -k examples/composable-pipeline. The S3 state backend is independent of that repository.
1. Find the pending run
Read the gate from one stack snapshot. The Workflow UID, node ID, plan ID and deadline identify the exact decision. A generic Waiting status does not necessarily mean a human approval is pending. For step logs, see Troubleshooting.
NS=platform-system
STACK=compose-manual
kubectl get iacstacks -A -o wide
SNAPSHOT="$(kubectl -n "$NS" get iacstack "$STACK" -o json)"
jq '.status.execution.approval | {pending, planID, expiresAt, required, workflowUID, nodeID}' <<< "$SNAPSHOT"
REVIEWED_ID="$(jq -er '.status.execution.approval.planID' <<< "$SNAPSHOT")"
2. Read the evidence that belongs to that plan
Use the same snapshot to obtain the artifact route. Set IACSTACK_ARGO_URL to your trusted HTTPS Argo Server and IACSTACK_ARGO_TOKEN to a short-lived token for your Kubernetes reading identity. The Argo Server uses client authentication and its own storage access. You need no direct S3 credentials.
ARTIFACT_PATH="$(iacstack approval plan-path <<< "$SNAPSHOT")" &&
printf 'Authorization: Bearer %s\n' "$IACSTACK_ARGO_TOKEN" |
curl -fsS --proto '=https' -H @- "${IACSTACK_ARGO_URL%/}$ARTIFACT_PATH"
This reads the saved review file even after the Plan Pod is removed, as long as Argo can still find the workflow and artifact. It does not recover arbitrary logs. When using the optional plugin for a quick look, kubectl iacstack plan "$STACK" "$NS" fetches the current gate, so use the snapshot method above when binding evidence to a decision.
3. Decide and watch the result
Install the example plugin kubectl-iacstack and the same-revision iacstack binary on your PATH. Submit the ID printed from the snapshot you actually reviewed. Omit --field when the workflow does not require CHG.
kubectl iacstack approve "$STACK" "$NS" --plan-id "$REVIEWED_ID" --field chg=CHG00042
kubectl -n "$NS" get iacstack "$STACK" -w
To reject instead of approving:
kubectl iacstack reject "$STACK" "$NS" --plan-id "$REVIEWED_ID"
Only identities allowed to create iacstackapprovals.iacstack.io in the stack namespace can submit a decision. Reviewers need separate read access to the stack and Workflow. Approvers do not need write access to Workflows. The controller validates the decision and delivers it to the matching gate; Argo executes Apply using the same saved plan. A rejection, expired decision, or replaced plan does not authorize Apply. A successful submission is not a successful Apply: watch the stack and check its final conditions.
Managed approval currently supports one designated gate per run and does not support compressed or offloaded node status. The workflow decides whether it needs a gate at all. A native Argo Resume does not replace an accepted decision for a managed gate. For workflow outputs, RBAC, and the full contract, see the managed approval guide in GitHub.