126 lines
3.8 KiB
YAML
126 lines
3.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
name: sor-admin
|
|
namespace: stone-server
|
|
labels:
|
|
app: sor-admin
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: sor-admin
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
sor/redeploy-at: "initial"
|
|
labels:
|
|
app: sor-admin
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: harbor-credentials
|
|
|
|
containers:
|
|
- name: sor-admin
|
|
# CI updates this image tag on every push to master.
|
|
image: registry.aeternalisgames.com/sor/sor-admin:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
|
|
envFrom:
|
|
- configMapRef:
|
|
name: sor-config
|
|
|
|
env:
|
|
# Postgres — same database, admin-specific schema access.
|
|
- name: ConnectionStrings__Default
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: ConnectionStrings__Default
|
|
- name: ConnectionStrings__Redis
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: redis-credentials
|
|
key: connection-string
|
|
|
|
# CDN (Ceph RadosGW S3-compatible) — needed for asset uploads in the admin portal.
|
|
- name: Cdn__PublicBaseUrl
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-cdn-portal
|
|
key: Cdn__PublicBaseUrl
|
|
- name: Cdn__EndpointUrl
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-cdn-portal
|
|
key: Cdn__EndpointUrl
|
|
- name: Cdn__AccessKey
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-cdn-portal
|
|
key: Cdn__AccessKey
|
|
- name: Cdn__SecretKey
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-cdn-portal
|
|
key: Cdn__SecretKey
|
|
- name: Cdn__BucketName
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-cdn-portal
|
|
key: Cdn__BucketName
|
|
|
|
# Initial SuperAdmin seed — created on first startup if the email doesn't exist yet.
|
|
- name: Admin__Email
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: Admin__Email
|
|
- name: Admin__Password
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: Admin__Password
|
|
|
|
# Keycloak OIDC secret for the sor-admin client (required for code→token exchange).
|
|
# Use a dedicated key to avoid accidental secret sharing with other clients.
|
|
- name: Keycloak__ClientSecret__Admin
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sor-app-secrets
|
|
key: Keycloak__ClientSecret__Admin
|
|
|
|
# ASP.NET Core Data Protection — persists Blazor auth cookies across restarts.
|
|
# TODO: generate a strong random value and store in sor-app-secrets.
|
|
- name: DataProtection__ApplicationName
|
|
value: "sor-admin"
|
|
|
|
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: "100m"
|
|
memory: "128Mi"
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|