Kubernetes operator that provisions static sites on Garage and exposes them through Traefik. Define a StaticSite CRD; drivethru reconciles a Garage bucket (with static-website hosting enabled), an S3-credentials Secret, and a Traefik IngressRoute.
See SPEC.md for the full design.
-
Configure the operator. Edit
config/manager/manager.yamlConfigMap + Secret with your Garage admin endpoint/token, or hand-craft your own:Env var Description Default GARAGE_HOSTConvenience host; derives both endpoints — GARAGE_S3_ENDPOINTS3 endpoint emitted into generated Secrets derived from GARAGE_HOSTGARAGE_ADMIN_ENDPOINTGarage admin API base URL derived from GARAGE_HOSTGARAGE_ADMIN_TOKENBearer token required TRAEFIK_ENTRYPOINTTraefik entrypoint to attach to websecureTRAEFIK_CERT_RESOLVERTraefik certResolver unset GARAGE_SERVICE_NAMEIn-cluster Service name for IngressRoute backend garageGARAGE_SERVICE_NAMESPACENamespace of that Service garage-systemGARAGE_WEB_PORTService port to route to 3902 -
Install the CRD and operator:
make install # apply the CRD make deploy IMG=your-registry/drivethru:tag -
Create a StaticSite:
apiVersion: drivethru.notjustanna.net/v1alpha1 kind: StaticSite metadata: name: my-site namespace: my-app spec: host: my-site.example.com
The operator will:
- create a Garage bucket aliased to
my-site.example.com - enable static website hosting on it
- create a Garage key
drivethru-my-site.example.comand grant it R/W - write a
Secretmy-site-s3withAWS_*variables ready foraws s3 sync - emit a Traefik
IngressRoutematchingHost(\my-site.example.com`)`
- create a Garage bucket aliased to
make test # unit tests
make build # local binary
make run # run against current kube context (requires Garage admin reachable)Out of scope: multi-Garage support, custom index pages, CORS/lifecycle rules, non-Traefik ingress controllers.