Documentation
¶
Overview ¶
k3s-backend is an HTTP server that implements the Fred backend protocol for provisioning K3s workloads. ENG-133 ships the scaffold: the binary boots, serves the BACKEND_GUIDE HTTP contract, signs and verifies callbacks, and probes the configured cluster's reachability via a single client-go Discovery().ServerVersion() call. The provisioner is a stub that posts status=failed, error="not implemented" callbacks; real K8s provisioning logic lands in ENG-134+.
Package main is the k3s-backend HTTP entry point. server.go (this file) declares the Server type, the backendService interface every handler calls into, the route table, the HMAC inbound middleware, the SSRF guard on outbound callback URLs, and the response helpers. main.go wires a *k3s.Backend instance into NewServer and runs the HTTP loop with graceful shutdown.