Skip to content

Agent Mesh

deploy: retire the agnhost canary

Antonio Ojea0a16ee773d88
diff --git a/.github/k8s/sam-canary-sa-template.yaml b/.github/k8s/sam-canary-sa-template.yaml
new file mode 100644
index 00000000..215bebde
--- /dev/null
+++ b/.github/k8s/sam-canary-sa-template.yaml
@@ -0,0 +1,8 @@
+# Identity shared by every canary node in the namespace; deploy.yaml's policy
+# seed binds it to the sam-canary role. Applied with the namespaces so it
+# exists before any canary references it.
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: sam-node-sa
+ namespace: sam-canary-${ENV_NAME}
diff --git a/.github/k8s/sam-node-template.yaml b/.github/k8s/sam-node-template.yaml
deleted file mode 100644
index 192fdcd2..00000000
--- a/.github/k8s/sam-node-template.yaml
+++ /dev/null
@@ -1,94 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: sam-canary-config-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
-data:
- sam-node.yaml: |
- version: "v1alpha1"
- attenuation:
- policies: []
- checks: []
- rules: []
- services:
- - type: mcp
- name: dummy-http
- description: "Canary HTTP tool (k8s agnhost)"
- # agnhost netexec responds with request info on the root path
- target_url: "http://localhost:9090/"
----
-apiVersion: v1
-kind: ServiceAccount
-metadata:
- name: sam-node-sa
- namespace: sam-canary-${ENV_NAME}
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: sam-canary-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
-spec:
- replicas: 3
- selector:
- matchLabels:
- app: sam-canary-${ENV_NAME}
- template:
- metadata:
- labels:
- app: sam-canary-${ENV_NAME}
- sam-canary: "true"
- spec:
- serviceAccountName: sam-node-sa
- containers:
- - name: sam-node
- image: ghcr.io/google/sam-node:${IMAGE_TAG}
- env:
- - name: SAM_API_TOKEN
- value: "secret-token"
- args:
- - "run"
- - "--config=/etc/sam/sam-node.yaml"
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - "--insecure-control-plane"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
- # 9091, not 9090: the agnhost container below owns 9090 in this pod.
- - "--metrics-addr=0.0.0.0:9091"
- ports:
- - containerPort: 8080
- - containerPort: 9091
- name: metrics
- resources:
- requests:
- cpu: 50m
- memory: 64Mi
- limits:
- cpu: 200m
- memory: 256Mi
- volumeMounts:
- - name: config-volume
- mountPath: /etc/sam
- - name: shared-bin
- mountPath: /shared
- - name: sam-token
- mountPath: /var/run/secrets/tokens
- readOnly: true
- - name: mock-mcp-server
- image: registry.k8s.io/e2e-test-images/agnhost:2.39
- # agnhost's netexec subcommand spins up a robust test HTTP server
- args: ["netexec", "--http-port=9090"]
- ports:
- - containerPort: 9090
- volumes:
- - name: config-volume
- configMap:
- name: sam-canary-config-${ENV_NAME}
- - name: shared-bin
- emptyDir: {}
- - name: sam-token
- projected:
- sources:
- - serviceAccountToken:
- path: sam-token
- expirationSeconds: 3600
- audience: "sam-control-plane-audience"
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index 7b121c5d..f9f2eef9 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -234,6 +234,7 @@ jobs:
kubectl create namespace dex --dry-run=client -o yaml | kubectl apply -f -
kubectl create namespace ${NAMESPACE} --dry-run=client -o yaml | kubectl apply -f -
kubectl create namespace ${CANARY_NAMESPACE} --dry-run=client -o yaml | kubectl apply -f -
+ envsubst '${ENV_NAME}' < .github/k8s/sam-canary-sa-template.yaml | kubectl apply -f -
- name: Provision Dex Secrets
env:
@@ -575,50 +576,6 @@ jobs:
exit 1
}
- - name: Deploy SAM Node Canary
- env:
- VAR_ENV_NAME: ${{ vars.ENV_NAME }}
- VAR_IMAGE_TAG: ${{ env.IMAGE_TAG }}
- run: |
- print_rollout_diagnostics() {
- local namespace="$1"
- local deployment="$2"
- local selector="$3"
-
- echo "Collecting diagnostics for deployment/${deployment} in namespace ${namespace}..."
-
- kubectl describe deployment/${deployment} -n ${namespace} || true
- kubectl get pods -n ${namespace} -l "${selector}" -o wide || true
- kubectl describe pods -n ${namespace} -l "${selector}" || true
- kubectl get events -n ${namespace} --sort-by=.lastTimestamp || true
-
- for pod in $(kubectl get pods -n ${namespace} -l "${selector}" -o name 2>/dev/null); do
- echo "==== Describe ${pod} ===="
- kubectl describe -n ${namespace} "${pod}" || true
-
- for container in $(kubectl get -n ${namespace} "${pod}" -o jsonpath='{.spec.containers[*].name}' 2>/dev/null); do
- echo "==== Logs for ${pod} container ${container} ===="
- kubectl logs -n ${namespace} "${pod#pod/}" -c "${container}" --tail=-1 || true
- done
- done
- }
-
- export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
- export NAMESPACE="sam-${ENV_NAME}"
- export IMAGE_TAG="${VAR_IMAGE_TAG}"
-
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-node-template.yaml | kubectl apply -f -
- kubectl rollout status deployment/sam-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=120s || {
- echo "Canary Deployment failed!"
- print_rollout_diagnostics "${CANARY_NAMESPACE}" "sam-canary-${ENV_NAME}" "app=sam-canary-${ENV_NAME}"
-
- echo "Rolling back Canary deployment..."
- kubectl rollout undo deployment/sam-canary-${ENV_NAME} -n ${CANARY_NAMESPACE}
- kubectl rollout status deployment/sam-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} || true
- exit 1
- }
-
- name: Deploy OpenClaw Canary
env:
VAR_ENV_NAME: ${{ vars.ENV_NAME }}
@@ -828,3 +785,4 @@ jobs:
kubectl rollout status deployment/openrouter-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} || true
exit 1
}
+
diff --git a/site/content/docs/integrations/vscode-copilot.md b/site/content/docs/integrations/vscode-copilot.md
index aad1d6f6..2100df91 100644
--- a/site/content/docs/integrations/vscode-copilot.md
+++ b/site/content/docs/integrations/vscode-copilot.md
@@ -162,8 +162,6 @@ Calls `discover_remote_services` with `{"type":"mcp"}`:
```json
[
- {"peer_id": "12D3KooWQ1hk…veSLS", "srv_name": "dummy-http",
- "srv_description": "Canary HTTP tool (k8s agnhost)"},
{"peer_id": "12D3KooWFQrX…9Uwe1V", "srv_name": "everything",
"srv_description": "MCP everything test server (tools, resources, prompts)"},
{"peer_id": "12D3KooWAjWy…RcZcs", "srv_name": "everything",
@@ -171,10 +169,10 @@ Calls `discover_remote_services` with `{"type":"mcp"}`:
]
```
-Note `everything` appearing twice under different peers, and `dummy-http` three
-times. Service names are not unique across the mesh and were never meant to be —
-the `peer_id` is the identity. Any step that remembers "the everything service"
-without remembering which peer will eventually talk to the wrong one.
+Note `everything` appearing twice under different peers. Service names are
+not unique across the mesh and were never meant to be — the `peer_id` is the
+identity. Any step that remembers "the everything service" without remembering
+which peer will eventually talk to the wrong one.
### Find tools, and read the failures
@@ -185,7 +183,7 @@ failures in one array:
```json
[
- {"peer_id": "12D3KooWQ1hk…veSLS", "tool_name": "mcp://dummy-http",
+ {"peer_id": "12D3KooWFQrX…9Uwe1V", "tool_name": "mcp://everything",
"error": "failed to connect: failed to connect client: calling \"initialize\": EOF"},
{"peer_id": "12D3KooWAjWy…RcZcs", "tool_name": "mcp://everything/get-sum",
"description": "Returns the sum of two numbers"},
@@ -194,7 +192,7 @@ failures in one array:
]
```
-Discovery is best-effort per peer. Three peers advertising `dummy-http` were
+Discovery is best-effort per peer. One of the two `everything` peers was
reachable enough to be listed but failed at `initialize`, and that is reported
as an `error` field on the entry rather than failing the whole call. A partly
broken mesh returns a partly populated array, so it is worth checking whether