An example kube deployment reflector, watcher stream, and axum web server in <100 lines of rust. It exposes a simple version api for deployments on /versions
.
Clone the repo and either run locally or deploy into a cluster:
Run against your current Kubernetes context:
cargo run
Apply deployment.yaml, then kubectl port-forward service/version 8000:80
Once running, the app will monitor the namespace of your context, and give you simplified version info on its web interface:
$ curl 0.0.0.0:8000/versions
[{"container":"clux/controller","name":"foo-controller","version":"latest"},{"container":"alpine","name":"debugger","version":"3.13"}]
$ curl 0.0.0.0:8000/versions/default/foo-controller
{"container":"clux/controller","name":"foo-controller","version":"latest"}
- Locally against a cluster:
cargo run
- In-cluster: edit and
tilt up
* - Docker build:
just build
NB: images + docker dev is linux/amd64
only atm.