Add CI/CD pipeline, Dockerfiles, and k8s/ArgoCD manifests
- 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>
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# SOR Kubernetes Secrets
|
||||
|
||||
These files are **NOT committed to git** (excluded via root `.gitignore`).
|
||||
The `*.yaml.template` files in this directory ARE committed — copy them, fill in
|
||||
real values, then apply to the cluster.
|
||||
|
||||
---
|
||||
|
||||
## Quick Setup
|
||||
|
||||
### 1. Harbor image pull secret
|
||||
```bash
|
||||
cp harbor-pull-secret.yaml.template harbor-pull-secret.yaml
|
||||
# edit harbor-pull-secret.yaml — fill in your Harbor username and password
|
||||
kubectl apply -f harbor-pull-secret.yaml
|
||||
```
|
||||
|
||||
### 2. Application secrets
|
||||
```bash
|
||||
cp sor-app-secrets.yaml.template sor-app-secrets.yaml
|
||||
# edit sor-app-secrets.yaml — fill in Postgres connection string and CDN credentials
|
||||
kubectl apply -f sor-app-secrets.yaml
|
||||
```
|
||||
|
||||
### 3. Gitea Actions repository secrets
|
||||
In your Gitea repository → Settings → Secrets, add:
|
||||
| Name | Value |
|
||||
|-------------------|--------------------------------|
|
||||
| HARBOR_USERNAME | Your Harbor robot account name |
|
||||
| HARBOR_PASSWORD | Your Harbor robot account token |
|
||||
|
||||
---
|
||||
|
||||
## Secrets Reference
|
||||
|
||||
| Secret Name | Key | Used By | Notes |
|
||||
|--------------------|----------------------------|-----------------|-------------------------------------------|
|
||||
| sor-app-secrets | ConnectionStrings__Default | host + admin | Postgres connection string |
|
||||
| sor-app-secrets | Cdn__PublicBaseUrl | host + admin | e.g. https://cdn.aeternalisgames.com |
|
||||
| sor-app-secrets | Cdn__UploadBaseUrl | host + admin | CDN upload endpoint |
|
||||
| sor-app-secrets | Cdn__ApiKey | host + admin | CDN API key |
|
||||
| redis-credentials | connection-string | host only | **Already exists** in stone-server ns |
|
||||
| harbor-credentials | .dockerconfigjson | both pods | Harbor image pull secret |
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- `redis-credentials` is assumed to already exist in the `stone-server` namespace.
|
||||
If the key name inside it is different from `connection-string`, update
|
||||
`deploy/k8s/deployment-host.yaml` to match.
|
||||
|
||||
- The Redis connection string format expected by StackExchange.Redis:
|
||||
`HOST:PORT,password=PASSWORD,ssl=true,abortConnect=false`
|
||||
|
||||
- The Postgres connection string format expected by Npgsql:
|
||||
`Host=HOST;Port=5432;Database=SOR;Username=USER;Password=PASSWORD;`
|
||||
|
||||
- For production, consider enabling SSL on the Postgres connection:
|
||||
`...;SSL Mode=Require;Trust Server Certificate=true`
|
||||
Reference in New Issue
Block a user