110 lines
3.8 KiB
YAML
110 lines
3.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
name: sor-website
|
|
namespace: stone-server
|
|
labels:
|
|
app: sor-website
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: sor-website
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
sor/redeploy-at: "initial"
|
|
labels:
|
|
app: sor-website
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: harbor-credentials
|
|
|
|
containers:
|
|
- name: sor-website
|
|
image: registry.aeternalisgames.com/sor/sor-website:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
|
|
# ── Shared non-secret config ───────────────────────────────────────
|
|
# Only ASPNETCORE_URLS and ASPNETCORE_ENVIRONMENT are relevant here.
|
|
# WebSocket/NATS/Gateway keys from sor-config are ignored by SOR.Website.
|
|
envFrom:
|
|
- configMapRef:
|
|
name: sor-config
|
|
|
|
# ── Website-specific secrets ───────────────────────────────────────
|
|
env:
|
|
# Postgres — Identity schema (account login/register) and Catalog
|
|
# (card/deck data displayed on the website).
|
|
- name: ConnectionStrings__Default
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: ConnectionStrings__Default
|
|
|
|
# Redis — stores DataProtection keys so all pod replicas can decrypt
|
|
# each other's __Host-sor-web-session cookies.
|
|
- name: ConnectionStrings__Redis
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: redis-credentials
|
|
key: connection-string
|
|
|
|
# CDN — public base URL used in page templates to build asset URLs.
|
|
- name: Cdn__PublicBaseUrl
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: Cdn__PublicBaseUrl
|
|
|
|
# Keycloak OIDC — set explicitly so website auth does not inherit
|
|
# a different client id from shared ConfigMap values.
|
|
- name: Keycloak__Authority
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: Keycloak__Authority
|
|
- name: Keycloak__ClientId
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: Keycloak__ClientId
|
|
- name: Keycloak__ClientSecret
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: Keycloak__ClientSecret
|
|
|
|
# ── 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 ─────────────────────────────────────────────────────
|
|
# Razor Pages with no background workers — light CPU, moderate memory
|
|
# for EF Core query compilation cache.
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "128Mi"
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|