Skip to content

Agent Mesh

fix deployment

Antonio Ojea47c5c221b5f0
diff --git a/.github/k8s/sam-hub-template.yaml b/.github/k8s/sam-hub-template.yaml
index 524e9fee..7b69573f 100644
--- a/.github/k8s/sam-hub-template.yaml
+++ b/.github/k8s/sam-hub-template.yaml
@@ -78,7 +78,7 @@ spec:
initialDelaySeconds: 15
periodSeconds: 20
args:
- - "--external-multiaddr=${EXTERNAL_MULTIADDR}"
+ - "--external-multiaddr=/dns4/${ENV_NAME}.sam-mesh.dev/tcp/443/wss"
# 1. Trust Dex for humans/Google/GitHub. 2. Trust GKE for internal Canaries.
- "--issuer=https://auth.sam-mesh.dev,https://container.googleapis.com/v1/projects/${GCP_PROJECT_ID}/locations/${CLUSTER_REGION}/clusters/${CLUSTER_NAME}"
# 1. Dex CLI client ID. 2. Canary projected volume audience.
diff --git a/.github/k8s/sam-node-openclaw-template.yaml b/.github/k8s/sam-node-openclaw-template.yaml
index 2d613292..3406a334 100644
--- a/.github/k8s/sam-node-openclaw-template.yaml
+++ b/.github/k8s/sam-node-openclaw-template.yaml
@@ -56,6 +56,11 @@ spec:
secretKeyRef:
name: openclaw-secret-${ENV_NAME}
key: gateway-token
+ - name: GEMINI_API_KEY
+ valueFrom:
+ secretKeyRef:
+ name: openclaw-secret-${ENV_NAME}
+ key: gemini-api-key
resources:
requests:
cpu: 100m
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index 6b1f7401..dcc8d382 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -285,17 +285,15 @@ jobs:
export ENV_NAME="${{ vars.ENV_NAME }}"
export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
export IMAGE_TAG="${{ env.IMAGE_TAG }}"
+ export GEMINI_API_KEY="${{ secrets.GEMINI_API_KEY }}"
- # 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
+ # Provision the openclaw-secret, preserving the gateway-token if it exists
+ GATEWAY_TOKEN=$(kubectl get secret openclaw-secret-${ENV_NAME} -n ${CANARY_NAMESPACE} -o jsonpath="{.data.gateway-token}" 2>/dev/null | base64 -d || openssl rand -hex 16)
+ kubectl create secret generic openclaw-secret-${ENV_NAME} \
+ --namespace=${CANARY_NAMESPACE} \
+ --from-literal=gateway-token="${GATEWAY_TOKEN}" \
+ --from-literal=gemini-api-key="${GEMINI_API_KEY}" \
+ --dry-run=client -o yaml | kubectl apply -f -
envsubst < .github/k8s/sam-node-template.yaml | kubectl apply -f -
envsubst < .github/k8s/sam-node-openclaw-template.yaml | kubectl apply -f -