Staging Deployment Infrastructure
Date: 2026-04-15
Scope: Production Dockerfiles, K8s manifests, CI/CD, and infra agent handoff for pssaas-staging on AKS
What Was Done
ADR-020: Shared Kubernetes Cluster with PSX
Formalized the decision to deploy PSSaaS to the same AKS cluster (pss-cluster) as PSX, using dedicated pssaas-* namespaces while sharing pss-platform services (Keycloak, Vault). PSX ADR-085 already anticipates this. Phased adoption — Docker Compose stays for local dev.
Production Dockerfiles
docs-site/Dockerfile.prod— Multi-stage:npm ci+npm run build→ nginx serving static site at/docs/on port 3000. Health check at/healthz.src/backend/Dockerfile.prod— Multi-stage:dotnet publish -c Release→ aspnet:8.0 runtime on port 8080. Health check at/api/health.
Kubernetes Manifests
infra/azure/k8s/pssaas-staging/services.yaml — ConfigMap + 3 Deployments + 3 Services:
| Service | Image | Port | Resources |
|---|---|---|---|
| docs | ghcr.io/.../docs:latest | 3000 | 50-200m CPU, 64-128Mi RAM |
| api | ghcr.io/.../api:latest | 8080 | 100-500m CPU, 256-512Mi RAM |
| redis | redis:7-alpine | 6379 | 50-200m CPU, 64-128Mi RAM |
API connects to SQL MI via secret-injected connection string (no local SQL Server in K8s).
Ingress
infra/azure/k8s/ingress/pssaas-ingress.yaml — Routes pssaas.staging.powerseller.com:
/docs/→ docs service/api/→ api service/→ redirect to/docs/- TLS via cert-manager (
letsencrypt-prod)
CI/CD
Two GitHub Actions workflows:
.github/workflows/_build-image.yaml— Reusable: build + push to GHCR with SHA tag.github/workflows/deploy-staging.yaml— Path-filtered builds (docs vs API),kubectl set imagedeployment
Infra Agent Handoff
infra/azure/HANDOFF-INFRA-AGENT.md — 8-step playbook for the PSX infra agent:
namespace creation, secrets, manifests, DNS, TLS verification, image build, health checks, Superset connection.
Files Created
docs-site/Dockerfile.prodsrc/backend/Dockerfile.prodinfra/azure/k8s/pssaas-staging/services.yamlinfra/azure/k8s/ingress/pssaas-ingress.yamlinfra/azure/scripts/create-pssaas-secrets.ps1.github/workflows/deploy-staging.yaml.github/workflows/_build-image.yamlinfra/azure/HANDOFF-INFRA-AGENT.mddocs-site/docs/adr/adr-020-shared-k8s-namespaces.md
What's Next
- Kevin relays the handoff prompt to the PSX infra agent
- Infra agent creates namespace, secrets, DNS, and applies manifests
- First images built (either via CI/CD trigger or manual docker push)
- Staff access docs at
https://pssaas.staging.powerseller.com/docs/ - Staff explore API at
https://pssaas.staging.powerseller.com/api/swagger/