- Gitea Actions workflow: build sor-host + sor-admin, push to Harbor, auto-update image tags in k8s manifests (GitOps — ArgoCD watches deploy/k8s/) - Dockerfile.host / Dockerfile.admin: multi-stage .NET 8 builds, non-root runtime - deploy/k8s/: configmap, deployments, services, nginx ingress - hub.aeternalisgames.com → sor-host (WebSocket gateway) - admin.aeternalisgames.com → sor-admin (Blazor admin portal) - hub-tls for hub, cert-manager auto-provisions admin-tls - deploy/secrets/: README + *.yaml.template files to populate (gitignored) - deploy/argo/application.yaml: ArgoCD Application (namespace stone-server) - Root .gitignore: excludes deploy/secrets/*.yaml (never commit populated secrets) 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>
62 lines
2.2 KiB
YAML
62 lines
2.2 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: sor-ingress
|
|
namespace: stone-server
|
|
annotations:
|
|
# cert-manager: automatically provision / renew Let's Encrypt certs.
|
|
# TODO: verify your cluster-issuer name (run: kubectl get clusterissuer -A).
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
|
|
# Nginx: keep WebSocket connections open for up to 1 hour.
|
|
# Required so clients don't get disconnected mid-game by proxy timeouts.
|
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
|
nginx.ingress.kubernetes.io/proxy-connect-timeout: "60"
|
|
|
|
# Nginx will forward HTTP → HTTPS and handle the WebSocket Upgrade header.
|
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
|
|
spec:
|
|
ingressClassName: nginx
|
|
|
|
tls:
|
|
# hub.aeternalisgames.com — game server + WebSocket gateway.
|
|
# hub-tls already exists in this namespace (your existing Let's Encrypt cert).
|
|
- hosts:
|
|
- hub.aeternalisgames.com
|
|
secretName: hub-tls
|
|
|
|
# admin.aeternalisgames.com — admin portal.
|
|
# cert-manager will auto-provision this cert on first deployment.
|
|
# TODO: ensure DNS A record for admin.aeternalisgames.com points to your ingress IP.
|
|
- hosts:
|
|
- admin.aeternalisgames.com
|
|
secretName: admin-tls
|
|
|
|
rules:
|
|
# ── Game server / WebSocket gateway ────────────────────────────────────────
|
|
- host: hub.aeternalisgames.com
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: sor-host
|
|
port:
|
|
number: 80
|
|
|
|
# ── Admin portal ───────────────────────────────────────────────────────────
|
|
# Hosted on a separate subdomain to avoid SignalR/Blazor path conflicts.
|
|
- host: admin.aeternalisgames.com
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: sor-admin
|
|
port:
|
|
number: 80
|