Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
deploy: router count per environment, ROUTER_REPLICAS
Antonio Ojea970855ab8124
diff --git a/.github/k8s/agentmesh-router-template.yaml b/.github/k8s/agentmesh-router-template.yamlindex ee8e8533..5aa1c78a 100644--- a/.github/k8s/agentmesh-router-template.yaml+++ b/.github/k8s/agentmesh-router-template.yaml@@ -30,7 +30,7 @@ metadata:namespace: ${NAMESPACE}spec:serviceName: "agentmesh-router-${ENV_NAME}"- replicas: 3+ replicas: ${ROUTER_REPLICAS}# A router that is ready has not been re-handshaken by anyone yet: members# redial a dropped router with a backoff that reaches a minute, and older# members only on their monitor interval of one minute. A rollout thatdiff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yamlindex a00706b9..5bc7f331 100644--- a/.github/workflows/deploy.yaml+++ b/.github/workflows/deploy.yaml@@ -383,6 +383,9 @@ jobs:VAR_GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }}VAR_CLUSTER_REGION: ${{ vars.CLUSTER_REGION }}VAR_CLUSTER_NAME: ${{ vars.CLUSTER_NAME }}+ # How many routers the environment runs; the member capacity of the+ # mesh is this times the high watermark over two. Unset is 3.+ VAR_ROUTER_REPLICAS: ${{ vars.ROUTER_REPLICAS }}run: |print_rollout_diagnostics() {local namespace="$1"@@ -415,13 +418,14 @@ jobs:export GCP_PROJECT_ID="${VAR_GCP_PROJECT_ID}"export CLUSTER_REGION="${VAR_CLUSTER_REGION}"export CLUSTER_NAME="${VAR_CLUSTER_NAME}"+ export ROUTER_REPLICAS="${VAR_ROUTER_REPLICAS:-3}"# Remove legacy sam-router StatefulSet before applying agentmesh-router so# hostPort 4501 (TCP/UDP) on the cluster nodes is released for the new pods.kubectl delete statefulset/sam-router-${ENV_NAME} service/sam-router-${ENV_NAME} -n ${NAMESPACE} --ignore-not-foundenvsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-control-plane-template.yaml | kubectl apply -f -- envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-router-template.yaml | kubectl apply -f -+ envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG} ${ROUTER_REPLICAS}' < .github/k8s/agentmesh-router-template.yaml | kubectl apply -f -envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-console-template.yaml | kubectl apply -f -envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID}' < .github/k8s/dns-sync-cronjob-template.yaml | kubectl apply -f -# Managed Prometheus ships with GKE; a cluster without it should not block the mesh rollout.