112 lines
3.7 KiB
YAML
112 lines
3.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
name: sor-chat
|
|
namespace: stone-server
|
|
labels:
|
|
app: sor-chat
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: sor-chat
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
sor/redeploy-at: "initial"
|
|
labels:
|
|
app: sor-chat
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: harbor-credentials
|
|
|
|
containers:
|
|
- name: sor-chat
|
|
image: registry.aeternalisgames.com/sor/sor-server:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
|
|
# ── Shared non-secret config ───────────────────────────────────────
|
|
envFrom:
|
|
- configMapRef:
|
|
name: sor-config
|
|
|
|
# ── Workers-specific overrides + secrets ───────────────────────────
|
|
env:
|
|
# Business-logic services only — no WebSocket, no auth gRPC.
|
|
# These pods subscribe to NATS and handle all game/store/social messages.
|
|
- name: ENABLED_SERVICES
|
|
value: "chat"
|
|
|
|
# Postgres — all schemas (chat, collection, bazaar, catalog, game, identity).
|
|
- name: ConnectionStrings__Default
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: ConnectionStrings__Default
|
|
|
|
# Redis — used by services for client push delivery (IClientPush).
|
|
- name: ConnectionStrings__Redis
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: redis-credentials
|
|
key: connection-string
|
|
|
|
# CDN — used by content and bazaar services for asset URLs.
|
|
- 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 ─────────────────────────────────────────────────────
|
|
# Heavier than gateway: holds DB connection pools for all service schemas.
|
|
resources:
|
|
requests:
|
|
cpu: "300m"
|
|
memory: "384Mi"
|
|
limits:
|
|
cpu: "1000m"
|
|
memory: "1Gi"
|