Skip to content

Agent Mesh

fix the deployment to use the internal endpoint

Antonio Ojeadb0fb97ff3a0
diff --git a/.github/k8s/sam-hub-template.yaml b/.github/k8s/sam-hub-template.yaml
index b569768f..4f30ada4 100644
--- a/.github/k8s/sam-hub-template.yaml
+++ b/.github/k8s/sam-hub-template.yaml
@@ -7,6 +7,7 @@ spec:
type: LoadBalancer
loadBalancerClass: "networking.gke.io/l4-regional-external"
loadBalancerIP: ${LOAD_BALANCER_IP}
+ allocateLoadBalancerNodePorts: false
ports:
- port: 4001
targetPort: 4001
@@ -16,6 +17,25 @@ spec:
targetPort: 4001
protocol: UDP
name: libp2p-udp
+ - port: 80
+ targetPort: 9090
+ protocol: TCP
+ name: http
+ selector:
+ app: sam-hub-${ENV_NAME}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: sam-hub-internal-${ENV_NAME}
+ namespace: ${NAMESPACE}
+spec:
+ type: ClusterIP
+ ports:
+ - port: 80
+ targetPort: 9090
+ protocol: TCP
+ name: http
selector:
app: sam-hub-${ENV_NAME}
---
diff --git a/.github/k8s/sam-node-template.yaml b/.github/k8s/sam-node-template.yaml
index 22e2201b..a302361a 100644
--- a/.github/k8s/sam-node-template.yaml
+++ b/.github/k8s/sam-node-template.yaml
@@ -60,7 +60,7 @@ spec:
args:
- "run"
- "--config=/etc/sam/sam-node.yaml"
- - "--hub=/dns4/sam-hub-${ENV_NAME}.sam-${ENV_NAME}.svc.cluster.local/udp/4001/quic-v1"
+ - "--hub=http://sam-hub-internal-${ENV_NAME}.sam-${ENV_NAME}.svc.cluster.local"
- "--jwt-path=/var/run/secrets/tokens/sam-token"
ports:
- containerPort: 8080