Skip to content

Agent Mesh

kind: deploy-kind-service.sh takes a plain directory path only

Tomas Tormoa81838288582
diff --git a/development/deploy-kind-service.sh b/development/deploy-kind-service.sh
index 386fb8f6..379367cb 100755
--- a/development/deploy-kind-service.sh
+++ b/development/deploy-kind-service.sh
@@ -1,20 +1,16 @@
#!/usr/bin/env bash
-# Build, load and install a service into the kind mesh. Takes an example name
-# under development/examples/ or a path to any directory with a Dockerfile and
-# a charts/sam-node values.yaml. Extra args pass to helm, e.g. --set replicaCount=3
+# Build, load and install a service into the kind mesh from a directory holding
+# a Dockerfile and a charts/sam-node values.yaml (e.g. development/examples/calc-mcp).
+# Extra args pass to helm, e.g. --set replicaCount=3
set -euo pipefail
-[[ $# -ge 1 ]] || { echo "usage: $(basename "$0") <example|service-dir> [helm args...]" >&2; exit 1; }
+[[ $# -ge 1 ]] || { echo "usage: $(basename "$0") <service-dir> [helm args...]" >&2; exit 1; }
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
-SERVICE="$1"; shift
-if [[ -d "${SERVICE}" ]]; then
- DIR="$(cd "${SERVICE}" && pwd)"
-else
- DIR="${PROJECT_ROOT}/development/examples/${SERVICE}"
-fi
-[[ -f "${DIR}/values.yaml" ]] || { echo "no values.yaml in ${DIR} (pass an example name under development/examples/ or a path to a service directory)" >&2; exit 1; }
+[[ -d "$1" ]] || { echo "not a directory: $1" >&2; exit 1; }
+DIR="$(cd "$1" && pwd)"; shift
+[[ -f "${DIR}/values.yaml" ]] || { echo "no values.yaml in ${DIR}" >&2; exit 1; }
NAME="$(basename "${DIR}")"
HELM="helm"
diff --git a/development/kind/run.sh b/development/kind/run.sh
index 775d221f..f6d7cdc8 100755
--- a/development/kind/run.sh
+++ b/development/kind/run.sh
@@ -267,7 +267,7 @@ echo " control plane: http://${MAIN_IP}"
echo " dex: ${OIDC_ISSUER}"
echo
echo "To put a service on the mesh, deploy an example with charts/sam-node:"
-echo " ./development/deploy-kind-service.sh calc-mcp"
+echo " ./development/deploy-kind-service.sh development/examples/calc-mcp"
echo "(it prints the docker build / kind load / helm install commands as it runs them)"
echo
echo "To drive the mesh, enroll a local node in another shell (it stays in the foreground):"
diff --git a/development/kind/test-mesh-e2e.sh b/development/kind/test-mesh-e2e.sh
index 2aad7ab3..ce38e7aa 100755
--- a/development/kind/test-mesh-e2e.sh
+++ b/development/kind/test-mesh-e2e.sh
@@ -16,7 +16,7 @@
set -euo pipefail
echo "== Deploying calc-mcp via charts/sam-node =="
-./development/deploy-kind-service.sh calc-mcp
+./development/deploy-kind-service.sh development/examples/calc-mcp
# If running locally, we might want to store logs in a temp dir
LOG_DIR="${RUNNER_TEMP:-$(mktemp -d)}"
diff --git a/site/content/docs/development/kubernetes-deployment.md b/site/content/docs/development/kubernetes-deployment.md
index 178972cb..afd71acf 100644
--- a/site/content/docs/development/kubernetes-deployment.md
+++ b/site/content/docs/development/kubernetes-deployment.md
@@ -72,12 +72,12 @@ helm --kube-context kind-sam-kind -n sam-kind install calc-mcp charts/sam-node \
`development/deploy-kind-service.sh` wraps those commands (as
`helm upgrade --install`, plus a rollout wait) and echoes each one as it
runs, so deploying — or redeploying after a code change — is one line. It
-takes an example name or a path to any directory holding a `Dockerfile` and
-a `values.yaml`, and extra args pass through to helm:
+takes a path to any directory holding a `Dockerfile` and a `values.yaml`,
+and extra args pass through to helm:
```bash
-./development/deploy-kind-service.sh calc-mcp
-./development/deploy-kind-service.sh code-reviewer-pool/reviewer --set replicaCount=3
+./development/deploy-kind-service.sh development/examples/calc-mcp
+./development/deploy-kind-service.sh development/examples/code-reviewer-pool/reviewer --set replicaCount=3
./development/deploy-kind-service.sh ~/src/my-service
```