Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.49 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.49 KB

version-rs

ci docker image

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.

Usage

Clone the repo and either run locally or deploy into a cluster:

Locally

Run against your current Kubernetes context:

cargo run

In-Cluster

Apply deployment.yaml, then kubectl port-forward service/version 8000:80

Api

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"}

Developing

  • 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.