@@ -261,11 +261,6 @@ jobs:
261261 export ENV_NAME="${VAR_ENV_NAME}"
262262 export NAMESPACE="sam-${ENV_NAME}"
263263 export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
264-
265- # Retire the legacy sam-canary namespace so its workloads (including the
266- # single-TPU vllm-canary pod) release cluster resources before rolling out
267- # agentmesh-canary.
268- kubectl delete namespace sam-canary-${ENV_NAME} --ignore-not-found
269264
270265 kubectl create namespace dex --dry-run=client -o yaml | kubectl apply -f -
271266 kubectl create namespace ${NAMESPACE} --dry-run=client -o yaml | kubectl apply -f -
@@ -354,17 +349,10 @@ jobs:
354349 export ENV_NAME="${VAR_ENV_NAME}"
355350 export NAMESPACE="sam-${ENV_NAME}"
356351 if ! kubectl get secret agentmesh-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} >/dev/null 2>&1; then
357- if kubectl get secret sam-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} >/dev/null 2>&1; then
358- echo "Migrating existing credentials from sam-control-plane-secret-${ENV_NAME}..."
359- ADMIN_TOKEN=$(kubectl get secret sam-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} -o jsonpath='{.data.admin-token}' | base64 -d)
360- DB_PASSWORD=$(kubectl get secret sam-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} -o jsonpath='{.data.db-password}' | base64 -d)
361- DB_DSN=$(kubectl get secret sam-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} -o jsonpath='{.data.db-dsn}' | base64 -d)
362- else
363- echo "Generating new random secrets for admin-token and the DB..."
364- ADMIN_TOKEN=$(openssl rand -hex 32)
365- DB_PASSWORD=$(openssl rand -hex 32)
366- DB_DSN="postgres://sam:${DB_PASSWORD}@sam-db-${ENV_NAME}:5432/sam_mesh?sslmode=disable"
367- fi
352+ echo "Generating new random secrets for admin-token and the DB..."
353+ ADMIN_TOKEN=$(openssl rand -hex 32)
354+ DB_PASSWORD=$(openssl rand -hex 32)
355+ DB_DSN="postgres://sam:${DB_PASSWORD}@sam-db-${ENV_NAME}:5432/sam_mesh?sslmode=disable"
368356 echo "::add-mask::${ADMIN_TOKEN}"
369357 echo "::add-mask::${DB_PASSWORD}"
370358 kubectl create secret generic agentmesh-control-plane-secret-${ENV_NAME} \
@@ -425,18 +413,13 @@ jobs:
425413 export ROUTER_REPLICAS="${VAR_ROUTER_REPLICAS:-3}"
426414 export ROUTER_HIGH_WATERMARK="${VAR_ROUTER_HIGH_WATERMARK:-6000}"
427415
428- # Remove legacy sam-router StatefulSet before applying agentmesh-router so
429- # hostPort 4501 (TCP/UDP) on the cluster nodes is released for the new pods.
430- kubectl delete statefulset/sam-router-${ENV_NAME} service/sam-router-${ENV_NAME} -n ${NAMESPACE} --ignore-not-found
431-
432416 envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-control-plane-template.yaml | kubectl apply -f -
433417 envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG} ${ROUTER_REPLICAS} ${ROUTER_HIGH_WATERMARK}' < .github/k8s/agentmesh-router-template.yaml | kubectl apply -f -
434418 envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-console-template.yaml | kubectl apply -f -
435419 envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID}' < .github/k8s/dns-sync-cronjob-template.yaml | kubectl apply -f -
436420 # Managed Prometheus ships with GKE; a cluster without it should not block the mesh rollout.
437421 if kubectl get crd podmonitorings.monitoring.googleapis.com >/dev/null 2>&1; then
438422 envsubst '${ENV_NAME} ${NAMESPACE}' < .github/k8s/agentmesh-monitoring-template.yaml | kubectl apply -f -
439- kubectl delete podmonitoring/sam-control-plane-${ENV_NAME} podmonitoring/sam-router-${ENV_NAME} rules/sam-${ENV_NAME} -n ${NAMESPACE} --ignore-not-found || true
440423 else
441424 echo "::warning::PodMonitoring CRD not found; managed collection is off on this cluster, metrics will not be scraped"
442425 fi
@@ -496,10 +479,6 @@ jobs:
496479 exit 1
497480 }
498481
499- # Retire legacy sam-control-plane and sam-console resources now that the
500- # Gateway points at agentmesh-control-plane and agentmesh-console.
501- kubectl delete deployment/sam-control-plane-${ENV_NAME} service/sam-control-plane-${ENV_NAME} healthcheckpolicy/sam-control-plane-healthcheck-${ENV_NAME} deployment/sam-console-${ENV_NAME} service/sam-console-${ENV_NAME} -n ${NAMESPACE} --ignore-not-found || true
502-
503482 # Each router is held 90s after it is ready (minReadySeconds) so
504483 # members re-attach before the next one goes, which with its
505484 # startup is about two minutes a router. The wait follows the
@@ -580,8 +559,7 @@ jobs:
580559 echo "Successfully generated bootstrap token."
581560
582561 echo "Provisioning GCE VM Router instance..."
583- # Delete existing VM (including legacy sam-router-*-vm) if it exists to ensure fresh deployment with the new token and image
584- gcloud compute instances delete sam-router-${ENV_NAME}-vm --zone=${ZONE} --project=${GCP_PROJECT_ID} --quiet || true
562+ # Delete existing VM if it exists to ensure fresh deployment with the new token and image
585563 gcloud compute instances delete agentmesh-router-${ENV_NAME}-vm --zone=${ZONE} --project=${GCP_PROJECT_ID} --quiet || true
586564
587565 # Create a new COS VM instance running the agentmesh-router. The
@@ -594,7 +572,7 @@ jobs:
594572 --machine-type=e2-small \
595573 --image-family=cos-stable \
596574 --image-project=cos-cloud \
597- --tags=sam-router, agentmesh-router \
575+ --tags=agentmesh-router \
598576 --metadata=startup-script='#!/bin/bash
599577 set -euo pipefail
600578 EXTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)
0 commit comments