- MainLayout.razor: wrap shell in <AuthorizeView> so the sidebar and nav are only rendered when the user is logged in. Unauthenticated pages (login) render @Body directly, giving the login card its full viewport without the nav overlay. - deployment-admin.yaml: inject Admin__Email / Admin__Password from sor-app-secrets so the startup seed picks up production credentials. - sor-app-secrets.yaml.template: add Admin__Email / Admin__Password placeholder entries with instructions. - secrets/README.md: document the two new seed-account keys. 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>
109 lines
3.1 KiB
YAML
109 lines
3.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: sor-admin
|
|
namespace: stone-server
|
|
labels:
|
|
app: sor-admin
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: sor-admin
|
|
template:
|
|
metadata:
|
|
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
|
|
|
|
# CDN (Ceph RadosGW S3-compatible) — needed for asset uploads in the admin portal.
|
|
- 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
|
|
|
|
# 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
|
|
|
|
# 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"
|