Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
add opclaw canaries
Antonio Ojea60d22c5de1a8
diff --git a/.github/k8s/sam-node-openclaw-template.yaml b/.github/k8s/sam-node-openclaw-template.yamlnew file mode 100644index 00000000..918fd4f3--- /dev/null+++ b/.github/k8s/sam-node-openclaw-template.yaml@@ -0,0 +1,110 @@+apiVersion: v1+kind: ConfigMap+metadata:+ name: sam-canary-openclaw-config-${ENV_NAME}+ namespace: sam-canary-${ENV_NAME}+data:+ sam-node.yaml: |+ version: "v1alpha1"+ attenuation:+ policies: []+ checks: []+ rules: []+ services:+ - type: mcp+ name: openclaw+ description: "OpenClaw AI Agent Gateway"+ # Register the OpenClaw local gateway as a mesh service+ target_url: "http://localhost:18789/mcp/events"+---+apiVersion: apps/v1+kind: Deployment+metadata:+ name: openclaw-canary-${ENV_NAME}+ namespace: sam-canary-${ENV_NAME}+spec:+ replicas: 2+ selector:+ matchLabels:+ app: openclaw-canary-${ENV_NAME}+ template:+ metadata:+ labels:+ app: openclaw-canary-${ENV_NAME}+ spec:+ serviceAccountName: sam-node-sa+ initContainers:+ - name: init-openclaw-config+ image: busybox:latest+ command: ["sh", "-c", "mkdir -p /data && echo '{\"gateway\": {\"mode\": \"local\"}}' > /data/openclaw.json"]+ volumeMounts:+ - name: openclaw-data+ mountPath: /data+ containers:+ - name: openclaw+ image: ghcr.io/openclaw/openclaw:latest+ ports:+ - containerPort: 18789+ name: http-gateway+ env:+ - name: SAM_MCP_URL+ value: "http://127.0.0.1:8080/mcp/events"+ - name: OPENCLAW_STATE_DIR+ value: "/data"+ - name: OPENCLAW_GATEWAY_TOKEN+ valueFrom:+ secretKeyRef:+ name: openclaw-secret-${ENV_NAME}+ key: gateway-token+ resources:+ requests:+ cpu: 100m+ memory: 256Mi+ limits:+ cpu: 500m+ memory: 1Gi+ volumeMounts:+ - name: openclaw-data+ mountPath: /data+ - name: dshm+ mountPath: /dev/shm+ - name: sam-node+ image: ghcr.io/google/sam-node:${IMAGE_TAG}+ args:+ - "run"+ - "--config=/etc/sam/sam-node.yaml"+ - "--hub=https://${ENV_NAME}.sam-mesh.dev"+ - "--jwt-path=/var/run/secrets/tokens/sam-token"+ - "--api-token=secret-token"+ - "--bind-addr=127.0.0.1:8080"+ ports:+ - containerPort: 8080+ 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-openclaw-config-${ENV_NAME}+ - name: openclaw-data+ emptyDir: {}+ - name: dshm+ emptyDir:+ medium: Memory+ - name: sam-token+ projected:+ sources:+ - serviceAccountToken:+ path: sam-token+ expirationSeconds: 3600+ audience: "sam-hub-audience"diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yamlindex 976c2d43..f9fea58d 100644--- a/.github/workflows/deploy.yaml+++ b/.github/workflows/deploy.yaml@@ -211,7 +211,20 @@ jobs:export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"export IMAGE_TAG="${{ env.IMAGE_TAG }}"+ # Idempotently provision the openclaw-secret if it doesn't already exist+ if ! kubectl get secret openclaw-secret-${ENV_NAME} -n ${CANARY_NAMESPACE} >/dev/null 2>&1; then+ echo "Generating a new random 16-byte hex key for OpenClaw Gateway Token..."+ GATEWAY_TOKEN=$(openssl rand -hex 16)+ kubectl create secret generic openclaw-secret-${ENV_NAME} \+ --namespace=${CANARY_NAMESPACE} \+ --from-literal=gateway-token="${GATEWAY_TOKEN}"+ else+ echo "openclaw-secret-${ENV_NAME} already exists in namespace ${CANARY_NAMESPACE}. Skipping generation."+ fi+envsubst < .github/k8s/sam-node-template.yaml | kubectl apply -f -+ envsubst < .github/k8s/sam-node-openclaw-template.yaml | kubectl apply -f -+kubectl rollout status deployment/sam-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=120s || {echo "Canary Deployment failed! Rolling back..."@@ -219,3 +232,10 @@ jobs:kubectl rollout status deployment/sam-canary-${ENV_NAME} -n ${CANARY_NAMESPACE}exit 1}++ kubectl rollout status deployment/openclaw-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=120s || {+ echo "OpenClaw Canary Deployment failed! Rolling back..."+ kubectl rollout undo deployment/openclaw-canary-${ENV_NAME} -n ${CANARY_NAMESPACE}+ kubectl rollout status deployment/openclaw-canary-${ENV_NAME} -n ${CANARY_NAMESPACE}+ exit 1+ }