[SMG] Expand K8s integration tests: cross-namespace, lifecycle, multi-model (#24375)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
e8d57e7243
commit
8b9ff4a68c
@@ -0,0 +1,79 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: smg-gateway-cluster
|
||||
namespace: smg-test
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: smg-gateway-cluster
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: smg-gateway-cluster
|
||||
spec:
|
||||
serviceAccountName: smg-gateway-cluster
|
||||
containers:
|
||||
- name: gateway
|
||||
image: smg-gateway:test
|
||||
imagePullPolicy: Never
|
||||
# No --service-discovery-namespace: watch all namespaces (Api::all
|
||||
# in service_discovery.rs:279). Requires the ClusterRole defined in
|
||||
# rbac-cluster-scoped.yaml.
|
||||
#
|
||||
# Selector includes `cross-ns-test=true` (in addition to the usual
|
||||
# app=fake-worker) so this gateway only registers workers deployed
|
||||
# by test_cross_namespace.py, not the app=fake-worker pods other
|
||||
# tests deploy in smg-test. Without this, the exact-count assertion
|
||||
# in the test would race with concurrent test files.
|
||||
args:
|
||||
- "--service-discovery"
|
||||
- "--selector"
|
||||
- "app=fake-worker"
|
||||
- "cross-ns-test=true"
|
||||
- "--service-discovery-port"
|
||||
- "8000"
|
||||
- "--port"
|
||||
- "30002"
|
||||
- "--prometheus-port"
|
||||
- "29002"
|
||||
- "--disable-health-check"
|
||||
- "--worker-startup-timeout-secs"
|
||||
- "30"
|
||||
- "--log-level"
|
||||
- "debug"
|
||||
ports:
|
||||
- containerPort: 30002
|
||||
name: http
|
||||
- containerPort: 29002
|
||||
name: metrics
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /liveness
|
||||
port: 30002
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /liveness
|
||||
port: 30002
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: smg-gateway-cluster
|
||||
namespace: smg-test
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: smg-gateway-cluster
|
||||
ports:
|
||||
- name: http
|
||||
port: 30002
|
||||
targetPort: 30002
|
||||
- name: metrics
|
||||
port: 29002
|
||||
targetPort: 29002
|
||||
Reference in New Issue
Block a user