Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
docs(minikube): document GFS auth key sync
Alfredo Lopezdf911da9f483
diff --git a/Makefile b/Makefileindex 876a5559a..2b4b0e5e5 100644--- a/Makefile+++ b/Makefile@@ -317,10 +317,11 @@ minikube-restart-deploy: ## Restart a single deployment without rebuilding (usag# KEY INVARIANT: After generating new keys, the public key must be in sync across:# 1. rpc-proxy-secrets (namespace: rpc-proxy) → RPC_PROXY_JWT_PUBLIC_KEY# 2. mcp-host-config (namespace: mcp-host) → CLERUM_AUTH_JWT_PUBLIC_KEY-# 3. deploy/overlays/minikube/configmaps/mcp-host-config.yaml (persisted in repo)+# 3. gfs-config (namespace: gfs) → jwt-public-key+# 4. deploy/overlays/minikube/configmaps/mcp-host-config.yaml (persisted in repo)## Use `make minikube-sync-auth-key` to copy the public key automatically-# from rpc-proxy-secrets into mcp-host-config after key regeneration.+# from rpc-proxy-secrets into both runtime ConfigMaps after key regeneration.#.PHONY: minikube-gen-keysminikube-gen-keys: ## Generate JWT signing keys + auto-sync to mcp-host-config@@ -362,7 +363,7 @@ minikube-apply-namespaces: ## Create all namespaces$(KC) apply -f deploy/base/namespaces.yaml.PHONY: minikube-sync-auth-key-minikube-sync-auth-key: ## Sync JWT public key from rpc-proxy-secrets -> mcp-host-config only when drift exists+minikube-sync-auth-key: ## Sync JWT public key from rpc-proxy-secrets into runtime ConfigMaps when drift exists@bash scripts/minikube/sync-auth-key.sh --context=$(MINIKUBE_PROFILE).PHONY: minikube-sync-auth-key-if-presentdiff --git a/docs/deploy/minikube.md b/docs/deploy/minikube.mdindex e31b05b01..4059e3039 100644--- a/docs/deploy/minikube.md+++ b/docs/deploy/minikube.md@@ -230,9 +230,9 @@ using them.> **NOTE**: `make minikube-gen-keys` applies the key Secrets and then chains> `make minikube-sync-auth-key` itself (Makefile, `minikube-gen-keys`), so the JWT public-> key lands in mcp-host-config without a separate command. Re-running+> key lands in `mcp-host-config` and `gfs-config` without a separate command. Re-running> `make minikube-sync-auth-key` later is harmless — `scripts/minikube/sync-auth-key.sh`-> only writes the ConfigMap when it detects drift.+> only writes each ConfigMap when it detects drift.> **`minikube-gen-keys` does NOT regenerate keys on an existing cluster.**> `scripts/minikube/generate-keys.sh` has an anti-pattern guard: if the Secret@@ -1002,5 +1002,6 @@ kubectl rollout restart deployment/external-rest-api -n profiles> **Note**: you do not edit the public key by hand.> `scripts/minikube/sync-auth-key.sh` copies `RPC_PROXY_JWT_PUBLIC_KEY` from the> `rpc-proxy-secrets` Secret into the live `mcp-host-config` ConfigMap (as-> `CLERUM_AUTH_JWT_PUBLIC_KEY`), and it is already invoked by+> `CLERUM_AUTH_JWT_PUBLIC_KEY`) and the live `gfs-config` ConfigMap (as+> `jwt-public-key`), and it is already invoked by> `make minikube-gen-keys` and `make minikube-deploy-all`.diff --git a/scripts/minikube/sync-auth-key.sh b/scripts/minikube/sync-auth-key.shindex d37836469..ad519aeb7 100755--- a/scripts/minikube/sync-auth-key.sh+++ b/scripts/minikube/sync-auth-key.sh@@ -91,7 +91,7 @@ PY# fetched once and synced into each consumer's ConfigMap below.if ! "${KCTL[@]}" get secret "${SOURCE_SECRET}" -n "${SOURCE_NAMESPACE}" >/dev/null 2>&1; thenif [[ "${REQUIRE_GFS}" == "true" ]]; then- die "required GFS auth source ${SOURCE_NAMESPACE}/${SOURCE_SECRET} is missing"+ die "required GFS auth source ${SOURCE_NAMESPACE}/${SOURCE_SECRET} is missing or unreadable"filog "Skipping auth key sync (${SOURCE_SECRET} not found)"exit 0@@ -102,7 +102,7 @@ if [[ "${REQUIRE_GFS}" == "true" && -z "${source_key}" ]]; thenfiif [[ "${REQUIRE_GFS}" == "true" ]] && \! "${KCTL[@]}" get configmap "${GFS_CONFIGMAP}" -n "${GFS_NAMESPACE}" >/dev/null 2>&1; then- die "required GFS auth target ${GFS_NAMESPACE}/${GFS_CONFIGMAP} is missing"+ die "required GFS auth target ${GFS_NAMESPACE}/${GFS_CONFIGMAP} is missing or unreadable"fi# ── Target 1: mcp-host-config (restart named chatllm/mcp-host with retry) ──────@@ -137,7 +137,7 @@ sync_mcp_host() {sync_gfs() {if ! "${KCTL[@]}" get configmap "${GFS_CONFIGMAP}" -n "${GFS_NAMESPACE}" >/dev/null 2>&1; thenif [[ "${REQUIRE_GFS}" == "true" ]]; then- die "required GFS auth target ${GFS_NAMESPACE}/${GFS_CONFIGMAP} disappeared during sync"+ die "required GFS auth target ${GFS_NAMESPACE}/${GFS_CONFIGMAP} disappeared or became unreadable during sync"filog "Skipping ${GFS_CONFIGMAP} sync (not found)"return 0diff --git a/scripts/tests/test-minikube-sync-auth-key.sh b/scripts/tests/test-minikube-sync-auth-key.shindex abeca521e..dd533086e 100755--- a/scripts/tests/test-minikube-sync-auth-key.sh+++ b/scripts/tests/test-minikube-sync-auth-key.sh@@ -160,6 +160,15 @@ if grep -q 'rollout restart deployment -l' "${LOG_FILE}"; thenexit 1fi+: >"${LOG_FILE}"+if ! TEST_KUBECTL_LOG="${LOG_FILE}" TEST_STATE_DIR="${STATE_DIR}" TEST_SOURCE_SECRET_PRESENT=0 \+ PATH="${TMP_DIR}:$PATH" bash "${ROOT}/scripts/minikube/sync-auth-key.sh" \+ --context fake >"${OUT_FILE}" 2>&1; then+ echo "FAIL: optional bootstrap auth sync no longer skips an absent source Secret" >&2+ exit 1+fi+grep -q 'Skipping auth key sync (rpc-proxy-secrets not found)' "${OUT_FILE}"+: >"${LOG_FILE}"if TEST_KUBECTL_LOG="${LOG_FILE}" TEST_STATE_DIR="${STATE_DIR}" TEST_SOURCE_SECRET_PRESENT=0 \PATH="${TMP_DIR}:$PATH" bash "${ROOT}/scripts/minikube/sync-auth-key.sh" \@@ -167,7 +176,7 @@ if TEST_KUBECTL_LOG="${LOG_FILE}" TEST_STATE_DIR="${STATE_DIR}" TEST_SOURCE_SECRecho "FAIL: strict GFS auth sync accepted a missing source Secret" >&2exit 1fi-grep -q 'required GFS auth source rpc-proxy/rpc-proxy-secrets is missing' "${OUT_FILE}" || {+grep -q 'required GFS auth source rpc-proxy/rpc-proxy-secrets is missing or unreadable' "${OUT_FILE}" || {cat "${OUT_FILE}" >&2echo "FAIL: strict GFS auth sync did not diagnose its missing source Secret" >&2exit 1@@ -198,7 +207,7 @@ if TEST_KUBECTL_LOG="${LOG_FILE}" TEST_STATE_DIR="${STATE_DIR}" \echo "FAIL: strict GFS auth sync accepted a missing gfs-config target" >&2exit 1fi-grep -q 'required GFS auth target gfs/gfs-config is missing' "${OUT_FILE}" || {+grep -q 'required GFS auth target gfs/gfs-config is missing or unreadable' "${OUT_FILE}" || {cat "${OUT_FILE}" >&2echo "FAIL: strict GFS auth sync did not diagnose its missing target" >&2exit 1