# Dedicated gateway used by the gateway-restart test in test_lifecycle.py. # Runs on its own ports (30005/29005) so killing this gateway's pod does # not invalidate the session-scoped port-forward against the default # smg-gateway used by test_reconciliation.py. # # This gateway's selector requires `app=fake-worker,lifecycle=restart`, so # pods from test_reconciliation.py (which carry only `app=fake-worker`) are # ignored here. The default `smg-gateway` does still match this test's # `lifecycle=restart` workers (its selector is the broader subset), but the # restart test never queries port 30000 — it only reads from this gateway, # so worker counts stay deterministic. apiVersion: apps/v1 kind: Deployment metadata: name: smg-gateway-restart namespace: smg-test spec: replicas: 1 selector: matchLabels: app: smg-gateway-restart template: metadata: labels: app: smg-gateway-restart spec: serviceAccountName: smg-gateway containers: - name: gateway image: smg-gateway:test imagePullPolicy: Never args: - "--service-discovery" - "--selector" - "app=fake-worker" - "lifecycle=restart" - "--service-discovery-port" - "8000" - "--service-discovery-namespace" - "smg-test" - "--port" - "30005" - "--prometheus-port" - "29005" - "--disable-health-check" - "--worker-startup-timeout-secs" - "30" - "--log-level" - "debug" ports: - containerPort: 30005 name: http - containerPort: 29005 name: metrics readinessProbe: httpGet: path: /liveness port: 30005 initialDelaySeconds: 3 periodSeconds: 3 livenessProbe: httpGet: path: /liveness port: 30005 initialDelaySeconds: 5 periodSeconds: 10 --- apiVersion: v1 kind: Service metadata: name: smg-gateway-restart namespace: smg-test spec: type: NodePort selector: app: smg-gateway-restart ports: - name: http port: 30005 targetPort: 30005 - name: metrics port: 29005 targetPort: 29005