Skip to content

Commit c3d1235

Browse files
oblinderclaude
andcommitted
docs(runbook): add the two secrets to the clean redeploy of the side
The clean redeploy of "Set the enforcement side" failed at enable.sh: the teardown deletes aiac-system/keycloak-admin-secret with the namespace, and enable.sh needs team1/openai-secret. Add the LLM key Secret as a precondition and a step that makes the namespace and the Keycloak admin Secret again. Renumber the steps and the step reference in docs/agents/deploy.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Oleg Blinder <oblinder@gmail.com>
1 parent 09de1a9 commit c3d1235

2 files changed

Lines changed: 22 additions & 7 deletions

File tree

‎docs/agents/deploy.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Usage: `/deploy ac-side=agent`, `/deploy agent-side`.
2525
- **Trap:** `kubectl apply -f k8s/agent-deployment.yaml` writes `target-side`
2626
back. On an `agent-side` deployment, after that apply, patch the live value
2727
back into the ConfigMap **before** the Controller restarts (this puts back
28-
the same value, and runbook step 4 sets it on an empty store; neither is a
28+
the same value, and runbook step 5 sets it on an empty store; neither is a
2929
side change). Else the restart starts the Controller under the other side.
3030
- **Precondition:** the AIAC global combiner must exist (`k8s/opa-kind-enable.sh`
3131
applies it), or the Controller does not start.

‎k8s/opa-kind-runbook.md‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,13 @@ no service is managed: onboard each service again.
274274
> inbound on `github-tool` check nothing.
275275
276276
The clean redeploy (Kind; `enable.sh` automates
277-
[`aiac-deployment-guide.md`](aiac-deployment-guide.md)):
277+
[`aiac-deployment-guide.md`](aiac-deployment-guide.md)).
278+
279+
Precondition: the LLM key Secret `team1/openai-secret` (data key `apikey`)
280+
exists. `enable.sh` reads it, and stops if it is missing. The teardown does not
281+
delete it. To make it:
282+
`kubectl create secret generic openai-secret -n team1 --from-literal=apikey="$LLM_API_KEY"`
283+
(see [`demo.md` → Two secrets to create first](../demo/use-cases/onboarding/demo.md#two-secrets-to-create-first)).
278284

279285
```bash
280286
SIDE=agent-side # or target-side
@@ -283,17 +289,26 @@ SIDE=agent-side # or target-side
283289
# until it is onboarded again.
284290
kubectl delete authorizationpolicy -A -l app.kubernetes.io/managed-by=aiac-pdp-policy-writer
285291

286-
# 2. Delete AIAC: the aiac-system namespace, with the Policy Model Store PVC.
292+
# 2. Delete AIAC: the aiac-system namespace, with the Policy Model Store PVC
293+
# and the keycloak-admin-secret.
287294
demo/use-cases/onboarding/teardown.sh --aiac-only --yes
288295

289-
# 3. Deploy AIAC again: the stack, then the broker. The Controller init
290-
# container waits for the broker.
296+
# 3. Make the namespace and the Keycloak admin Secret again. `enable.sh` does
297+
# not make the Secret, and without it aiac-interface stays in
298+
# ContainerCreating.
291299
set -a; . .env; set +a
300+
kubectl create namespace aiac-system
301+
kubectl create secret generic keycloak-admin-secret -n aiac-system \
302+
--from-literal=KEYCLOAK_ADMIN_USERNAME="$KEYCLOAK_ADMIN_USERNAME" \
303+
--from-literal=KEYCLOAK_ADMIN_PASSWORD="$KEYCLOAK_ADMIN_PASSWORD"
304+
305+
# 4. Deploy AIAC again: the stack, then the broker. The Controller init
306+
# container waits for the broker.
292307
demo/use-cases/onboarding/enable.sh --stack-only
293308
demo/use-cases/onboarding/enable.sh --broker-only
294309

295-
# 4. Set the side. `k8s/agent-deployment.yaml` sets `target-side`, so set the
296-
# side after step 3. The store is empty, so the Controller start writes no CR.
310+
# 5. Set the side. `k8s/agent-deployment.yaml` sets `target-side`, so set the
311+
# side after step 4. The store is empty, so the Controller start writes no CR.
297312
kubectl patch configmap aiac-agent-config -n aiac-system --type merge \
298313
-p "{\"data\":{\"AIAC_ENFORCEMENT_SIDE\":\"${SIDE}\"}}"
299314
kubectl rollout restart deployment/aiac-agent -n aiac-system

0 commit comments

Comments
 (0)