diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-11-09 10:50:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-09 10:50:59 -0500 |
| commit | 20d07c7005665f8e2001b4cbd24e15ec589d9882 (patch) | |
| tree | 8b98d1446c6d9e42bc2621e633543e0420f43541 /cmd/xesite | |
| parent | 2b349f56cb20420dd153f40f22b3654b5079100f (diff) | |
| download | xesite-20d07c7005665f8e2001b4cbd24e15ec589d9882.tar.xz xesite-20d07c7005665f8e2001b4cbd24e15ec589d9882.zip | |
Move to Kubernetes (#853)
* start to lift-and-shift to k8s
Signed-off-by: Xe Iaso <me@xeiaso.net>
* manifest/xesite: properly configure pod disruption budget, hostmount for xesite as a hack
Signed-off-by: Xe Iaso <me@xeiaso.net>
* properly slonk readiness
Signed-off-by: Xe Iaso <me@xeiaso.net>
* manifest: move to aeacus
Signed-off-by: Xe Iaso <me@xeiaso.net>
* internal: add OnionLocation middleware
Signed-off-by: Xe Iaso <me@xeiaso.net>
* internal/lume: jettison serving from the zipfile
Signed-off-by: Xe Iaso <me@xeiaso.net>
* yolo deploy to prod
Signed-off-by: Xe Iaso <me@xeiaso.net>
* okay use a machineproxy here
Signed-off-by: Xe Iaso <me@xeiaso.net>
* test CI/CD
Signed-off-by: Xe Iaso <me@xeiaso.net>
* try civo route
Signed-off-by: Xe Iaso <me@xeiaso.net>
* lol
Signed-off-by: Xe Iaso <me@xeiaso.net>
* plan c?
Signed-off-by: Xe Iaso <me@xeiaso.net>
* specify the region
Signed-off-by: Xe Iaso <me@xeiaso.net>
* lol
Signed-off-by: Xe Iaso <me@xeiaso.net>
* blog: hello again kubernetes!
Signed-off-by: Xe Iaso <me@xeiaso.net>
---------
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/xesite')
| -rw-r--r-- | cmd/xesite/internalapi.go | 4 | ||||
| -rw-r--r-- | cmd/xesite/main.go | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/cmd/xesite/internalapi.go b/cmd/xesite/internalapi.go index c0dfa9c..615af72 100644 --- a/cmd/xesite/internalapi.go +++ b/cmd/xesite/internalapi.go @@ -3,6 +3,7 @@ package main import ( "context" "expvar" + "fmt" "log" "net" "net/http" @@ -23,6 +24,9 @@ func internalAPI(fs *lume.FS) { mux := http.NewServeMux() mux.Handle("/debug/vars", expvar.Handler()) + mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintln(w, "OK") + }) mux.HandleFunc("/rebuild", func(w http.ResponseWriter, r *http.Request) { go fs.Update(context.Background()) diff --git a/cmd/xesite/main.go b/cmd/xesite/main.go index 0062086..bef58e7 100644 --- a/cmd/xesite/main.go +++ b/cmd/xesite/main.go @@ -126,6 +126,7 @@ func main() { h = internal.AcceptEncodingMiddleware(h) h = internal.RefererMiddleware(h) h = internal.DomainRedirect(h, *devel) + h = internal.OnionLocation(h) slog.Info("starting server", "bind", *bind) log.Fatal(http.Serve(ln, h)) |
