Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
deploy: retire the cop canary
Antonio Ojea1581afa93874
diff --git a/.github/k8s/sam-node-cop-template.yaml b/.github/k8s/sam-node-cop-template.yamldeleted file mode 100644index 29357c8b..00000000--- a/.github/k8s/sam-node-cop-template.yaml+++ /dev/null@@ -1,102 +0,0 @@-apiVersion: v1-kind: ConfigMap-metadata:- name: sam-canary-cop-config-${ENV_NAME}- namespace: sam-canary-${ENV_NAME}-data:- sam-node.yaml: |- version: "v1alpha1"- attenuation:- policies:- - 'allow if service("mcp", "cop");'- - 'allow if service("system", "/sam/catalog");'- checks: []- rules: []- services: []- banana_bot_playground.py: |-${BANANA_BOT_SCRIPT}-----apiVersion: apps/v1-kind: Deployment-metadata:- name: cop-canary-${ENV_NAME}- namespace: sam-canary-${ENV_NAME}-spec:- replicas: 2- selector:- matchLabels:- app: cop-canary-${ENV_NAME}- template:- metadata:- labels:- app: cop-canary-${ENV_NAME}- sam-canary: "true"- spec:- serviceAccountName: sam-node-sa- containers:- - name: cop-agent- image: python:3.11-slim- ports:- - containerPort: 18790- name: http- command:- - "/bin/bash"- - "-c"- - |- pip install --no-cache-dir httpx 'mcp>=2,<3' &&- python -u /app/banana_bot_playground.py- env:- - name: SAM_MCP_URL- value: "http://127.0.0.1:8080/mcp"- - name: SAM_API_TOKEN- value: "secret-token"- - name: GEMINI_API_KEY- valueFrom:- secretKeyRef:- name: openclaw-secret-${ENV_NAME}- key: gemini-api-key- volumeMounts:- - name: config-volume- mountPath: /app/banana_bot_playground.py- subPath: banana_bot_playground.py- - 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"- - "--bind-addr=127.0.0.1:8080"- - "--metrics-addr=0.0.0.0:9090"- ports:- - containerPort: 8080- - containerPort: 9090- name: metrics- resources:- requests:- cpu: 50m- memory: 64Mi- limits:- cpu: 200m- memory: 256Mi- volumeMounts:- - name: config-volume- mountPath: /etc/sam- - name: sam-token- mountPath: /var/run/secrets/tokens- readOnly: true- volumes:- - name: config-volume- configMap:- name: sam-canary-cop-config-${ENV_NAME}- - 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.yamlindex d8eac832..7b121c5d 100644--- a/.github/workflows/deploy.yaml+++ b/.github/workflows/deploy.yaml@@ -535,48 +535,6 @@ jobs:--external-addr=/ip4/${EXTERNAL_IP}/tcp/4501 \--external-addr=/ip4/${EXTERNAL_IP}/udp/4501/quic-v1'-- - name: Deploy COP 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}"- export BANANA_BOT_SCRIPT=$(cat site/content/docs/snippets/banana_bot_playground.py | sed 's/^/ /')-- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG} ${BANANA_BOT_SCRIPT}' < .github/k8s/sam-node-cop-template.yaml | kubectl apply -f -- kubectl rollout status deployment/cop-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=120s || {- echo "Cop Canary Deployment failed!"- print_rollout_diagnostics "${CANARY_NAMESPACE}" "cop-canary-${ENV_NAME}" "app=cop-canary-${ENV_NAME}"- exit 1- }-- name: Deploy SAM Box Canaryenv:VAR_ENV_NAME: ${{ vars.ENV_NAME }}