Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/k8s/sam-box-canary-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
metadata:
labels:
app: box-canary-${ENV_NAME}
sam-canary: "true"
spec:
serviceAccountName: sam-box-sa
# nano-init ships as its own image with no shell in it, so the binary is
Expand All @@ -84,6 +85,11 @@ spec:
# the socket's permissions are the credential.
- "--bind-addr="
- "--socket-path=/var/run/sam/node.sock"
# The one TCP port, and it carries nothing an API token would gate.
- "--metrics-addr=0.0.0.0:9090"
ports:
- containerPort: 9090
name: metrics
resources:
requests:
cpu: 50m
Expand All @@ -107,6 +113,10 @@ spec:
- "--sidecar-socket=/var/run/sam/node.sock"
- "--egress-allow=example.com"
- "--log-level=debug"
- "--metrics-addr=0.0.0.0:9091"
ports:
- containerPort: 9091
name: box-metrics
resources:
requests:
cpu: 20m
Expand Down
8 changes: 8 additions & 0 deletions .github/k8s/sam-canary-sa-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Identity shared by every canary node in the namespace; deploy.yaml's policy
# seed binds it to the sam-canary role. Applied with the namespaces so it
# exists before any canary references it.
apiVersion: v1
kind: ServiceAccount
metadata:
name: sam-node-sa
namespace: sam-canary-${ENV_NAME}
53 changes: 53 additions & 0 deletions .github/k8s/sam-monitoring-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Scrape targets for Google Managed Prometheus, which GKE runs by default.
# A PodMonitoring only sees pods in its own namespace, so the canaries get
# their own below.
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
name: sam-control-plane-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
selector:
matchLabels:
app: sam-control-plane-${ENV_NAME}
endpoints:
- port: http
path: /metrics
interval: 30s
---
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
name: sam-router-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
selector:
matchLabels:
app: sam-router-${ENV_NAME}
endpoints:
- port: metrics
path: /metrics
interval: 30s
---
# Every canary pod carries sam-canary=true; a pod without one of these named
# ports is simply not a target for that endpoint.
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
name: sam-canaries-${ENV_NAME}
namespace: sam-canary-${ENV_NAME}
spec:
selector:
matchLabels:
sam-canary: "true"
endpoints:
- port: metrics
path: /metrics
interval: 30s
- port: box-metrics
path: /metrics
interval: 30s
targetLabels:
fromPod:
- from: app
to: canary
98 changes: 0 additions & 98 deletions .github/k8s/sam-node-cop-template.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/k8s/sam-node-everything-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
metadata:
labels:
app: everything-canary-${ENV_NAME}
sam-canary: "true"
spec:
serviceAccountName: sam-node-sa
containers:
Expand Down Expand Up @@ -58,8 +59,11 @@ spec:
- "--insecure-control-plane"
- "--jwt-path=/var/run/secrets/tokens/sam-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
- containerPort: 8080
- containerPort: 9090
name: metrics
resources:
requests:
cpu: 50m
Expand Down
4 changes: 4 additions & 0 deletions .github/k8s/sam-node-openclaw-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
metadata:
labels:
app: openclaw-canary-${ENV_NAME}
sam-canary: "true"
spec:
serviceAccountName: sam-node-sa
containers:
Expand Down Expand Up @@ -114,8 +115,11 @@ spec:
- "--insecure-control-plane"
- "--jwt-path=/var/run/secrets/tokens/sam-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
- containerPort: 8080
- containerPort: 9090
name: metrics
resources:
requests:
cpu: 50m
Expand Down
4 changes: 4 additions & 0 deletions .github/k8s/sam-node-openrouter-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ spec:
metadata:
labels:
app: openrouter-canary-${ENV_NAME}
sam-canary: "true"
spec:
serviceAccountName: sam-node-sa
containers:
Expand Down Expand Up @@ -67,8 +68,11 @@ spec:
- "--insecure-control-plane"
- "--jwt-path=/var/run/secrets/tokens/sam-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
- containerPort: 8080
- containerPort: 9090
name: metrics
resources:
requests:
cpu: 500m
Expand Down
89 changes: 0 additions & 89 deletions .github/k8s/sam-node-template.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/k8s/sam-node-vllm-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ spec:
metadata:
labels:
app: vllm-canary-${ENV_NAME}
sam-canary: "true"
spec:
serviceAccountName: sam-node-sa
nodeSelector:
Expand Down Expand Up @@ -107,8 +108,11 @@ spec:
- "--insecure-control-plane"
- "--jwt-path=/var/run/secrets/tokens/sam-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
- containerPort: 8080
- containerPort: 9090
name: metrics
resources:
requests:
cpu: 50m
Expand Down
Loading
Loading