Files
sor/deploy/k8s/deployment-ai.yaml
T
3b711c8792 fix: AI pod ENABLED_SERVICES must include game to register AI handlers
The sor-ai deployment ran with ENABLED_SERVICES=ai, but AddAiService is
guarded by IsEnabled("game") in Program.cs. The AI handlers (GameAddAiHandler
etc.) were never registered, so game.ai.add fell through to NATS remote
dispatch, which timed out with "No internal service is available".

Fix: set ENABLED_SERVICES=game,ai so the AI pod registers AddGameService
(providing GameDbContext, IdentityDbContext, CollectionDbContext, CatalogDbContext
and all game message handlers) before AddAiService adds the AI-specific handlers
and session manager on top.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-12 22:14:49 -04:00

102 lines
2.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
argocd.argoproj.io/sync-wave: "1"
name: sor-ai
namespace: stone-server
labels:
app: sor-ai
spec:
replicas: 1
selector:
matchLabels:
app: sor-ai
template:
metadata:
annotations:
sor/redeploy-at: "initial"
labels:
app: sor-ai
spec:
imagePullSecrets:
- name: harbor-credentials
containers:
- name: sor-ai
image: registry.aeternalisgames.com/sor/sor-server:latest
ports:
- containerPort: 8080
envFrom:
- configMapRef:
name: sor-config
env:
- name: ENABLED_SERVICES
value: "game,ai"
- name: ConnectionStrings__Default
valueFrom:
secretKeyRef:
name: sor-app-secrets
key: ConnectionStrings__Default
- name: ConnectionStrings__Redis
valueFrom:
secretKeyRef:
name: redis-credentials
key: connection-string
- 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
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:
requests:
cpu: "300m"
memory: "384Mi"
limits:
cpu: "1000m"
memory: "1Gi"