gw-10 — Execution
Prerequisites
- Go ≥ 1.25 (stdlib only, offline). Optional for the real operator:
kubebuilder,kind/k3d,kubectl.
One-shot
cd gw-10-gateway-api-operators && bash scripts/verify.sh # tests + lifecycle demo
Per-language workflow (Go)
cd gw-10-gateway-api-operators/src/go
go test -race -count=1 ./... # self-heal, idempotency, status, finalizers, controller
go run ./cmd/operatordemo # the reconcile lifecycle, step by step
Package map
| File | What |
|---|---|
operator/store.go | in-memory "apiserver": objects, generation, finalizers, deletionTimestamp |
operator/dataplane.go | the programmed sink (content-hash versioned, idempotent, can fail) |
operator/reconcile.go | level-triggered reconcile: self-heal, status, finalizer cleanup, reprogram-all |
operator/controller.go | work-queue controller (Enqueue / ProcessAll / Run) |
cmd/operatordemo | the lifecycle demonstration |
Real operator
steps/01-crd-and-reconcile.md scaffolds the same Reconcile with
kubebuilder against a real apiserver; steps/02 wires the data-plane
program + finalizers. See GUIDE.md §5 for how this becomes
Envoy Gateway with gw-08.