kup6s-pages¶
Multi-Tenant Static Site Hosting Operator
kup6s-pages provides cloud-native static website hosting from Git repositories with automatic TLS and Traefik integration.
Overview¶
The kup6s-pages deployment provides:
pages-operator - Watches StaticSite CRDs, creates IngressRoutes and Certificates
pages-syncer - Clones/pulls Git repositories to shared PVC
nginx - Serves static files from shared PVC
ArgoCD GitOps Management - Deployed from dp-infra/kup6s-pages
CDK8S Infrastructure as Code - TypeScript-based manifest generation
Key Features¶
Multi-Tenant Architecture¶
Single nginx pod serves all sites (no per-site overhead)
StaticSite CRDs can be created in any namespace
Operator watches across all namespaces via ClusterRole
Git Integration¶
Deploy from any Git repository (GitHub, GitLab, Forgejo)
Webhook support for instant updates on push
Private repository support via deploy tokens
Configurable sync intervals
Automatic TLS¶
cert-manager integration for automatic HTTPS certificates
Custom domain support with automatic Certificate creation
Shared certificates for multiple sites on same domain
Traefik Integration¶
Automatic IngressRoute creation
Path prefix support for multiple repos on same domain
addPrefix middleware for efficient nginx routing
Quick Start¶
Check Operator Status¶
# Check kup6s-pages pods
kubectl get pods -n kup6s-pages
# Check ArgoCD sync status
kubectl get application kup6s-pages-app-* -n argocd
List Static Sites¶
# List all static sites
kubectl get staticsites -A
# Check specific site status
kubectl describe staticsite <site-name> -n <namespace>
Create a Static Site¶
apiVersion: pages.kup6s.com/v1alpha1
kind: StaticSite
metadata:
name: my-website
namespace: my-namespace
spec:
repo: https://github.com/user/my-website.git
domain: www.example.com
See How-To: Create Static Site for detailed instructions.
Architecture¶
Request Flow:
https://www.example.com/about.html
│
▼
┌─────────────────┐
│ Traefik │ Host(`www.example.com`) matched
│ │ Middleware: addPrefix(/my-website)
└────────┬────────┘
│ /my-website/about.html
▼
┌─────────────────┐
│ nginx (1 Pod) │ root /sites;
│ │ serves /sites/my-website/about.html
└────────┬────────┘
│
▼
┌─────────────────────────────────┐
│ PVC: /sites │
│ ├── my-website/ ← from repo │
│ ├── other-site/ │
└─────────────────────────────────┘
CDK8S Structure¶
dp-infra/kup6s-pages/
├── charts/constructs/
│ ├── namespace.ts # kup6s-pages namespace (sync-wave 0)
│ └── helmchart.ts # kup6s-pages HelmChart (sync-wave 1)
├── config.yaml # Operator configuration
└── manifests/
└── kup6s-pages.k8s.yaml # Generated manifests
Documentation¶
Explanation¶
Architecture Overview - How operator, syncer, and nginx work together
How-To Guides¶
Create Static Site - Deploy a site from Git repository
Configure Custom Domain - Set up custom domains with TLS
Use Private Repos - Deploy tokens and secrets
Troubleshoot - Common issues and solutions
Reference¶
Configuration - Helm values and config.yaml reference
StaticSite CRD - CRD spec and status fields
Webhook Endpoints - Git webhook setup