apiVersion: apps/v1 kind: Deployment metadata: annotations: argocd.argoproj.io/sync-wave: "1" name: sor-gateway namespace: stone-server labels: app: sor-gateway spec: replicas: 2 selector: matchLabels: app: sor-gateway template: metadata: annotations: sor/redeploy-at: "initial" labels: app: sor-gateway spec: imagePullSecrets: - name: harbor-credentials containers: - name: sor-gateway image: registry.aeternalisgames.com/sor/sor-server:latest ports: - containerPort: 8080 - containerPort: 5001 # ── Shared non-secret config ─────────────────────────────────────── envFrom: - configMapRef: name: sor-config # ── Gateway-specific overrides + secrets ─────────────────────────── env: # This pod runs only the WebSocket gateway and the auth gRPC service. # Auth is co-located so JWT validation has no extra network hop. - name: ENABLED_SERVICES value: "gateway,auth" # Auth gRPC is in the same process — call ourselves. - name: Services__Auth value: "http://localhost:5001" # Postgres — Identity schema only (auth needs it for account lookups). - name: ConnectionStrings__Default valueFrom: secretKeyRef: name: sor-app-secrets key: ConnectionStrings__Default # Redis — used by gateway for client push delivery. - name: ConnectionStrings__Redis valueFrom: secretKeyRef: name: redis-credentials key: connection-string # CDN — not used by gateway/auth, but included to keep secret binding uniform. - name: Cdn__PublicBaseUrl valueFrom: secretKeyRef: name: sor-app-secrets key: Cdn__PublicBaseUrl - name: Cdn__EndpointUrl valueFrom: secretKeyRef: name: sor-app-secrets key: Cdn__EndpointUrl - name: Cdn__AccessKey valueFrom: secretKeyRef: name: sor-app-secrets key: Cdn__AccessKey - name: Cdn__SecretKey valueFrom: secretKeyRef: name: sor-app-secrets key: Cdn__SecretKey - name: Cdn__BucketName valueFrom: secretKeyRef: name: sor-app-secrets key: Cdn__BucketName # ── Health checks ────────────────────────────────────────────────── livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 15 periodSeconds: 30 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 3 # ── Resources ───────────────────────────────────────────────────── # Lighter than workers: no business-logic DB connections. resources: requests: cpu: "150m" memory: "128Mi" limits: cpu: "500m" memory: "512Mi"