Add LICENSE and README + config-guide

This commit is contained in:
2026-04-10 22:22:56 +02:00
parent 040d6f5853
commit 530d85740e
19 changed files with 472 additions and 0 deletions

64
README.md Normal file
View File

@@ -0,0 +1,64 @@
# maglevd
Health checker and gRPC control plane for VPP Maglev load balancing.
## Build
```sh
make # builds bin/maglevd
make test # runs all tests
make proto # regenerates gRPC stubs from proto/maglev.proto
```
Requires Go 1.25+ and (for `make proto`) `protoc` with `protoc-gen-go` and `protoc-gen-go-grpc`.
## Run
```sh
maglevd --config /etc/maglev/maglev.yaml --grpc-addr :9090
```
| Flag | Env | Default |
|---|---|---|
| `--config` | `MAGLEV_CONFIG` | `/etc/maglev/frontend.yaml` |
| `--grpc-addr` | `MAGLEV_GRPC_ADDR` | `:9090` |
| `--log-level` | `MAGLEV_LOG_LEVEL` | `info` |
Send `SIGHUP` to reload the config without restarting. Backends whose health-check config is
unchanged continue probing uninterrupted.
`maglevd` requires `CAP_NET_RAW` to open raw ICMP sockets.
## Minimal config
```yaml
maglev:
healthchecks:
http:
type: http
port: 80
params:
path: /healthz
interval: 2s
timeout: 3s
backends:
web0: {address: 192.0.2.10, healthcheck: http}
web1: {address: 192.0.2.11, healthcheck: http}
frontends:
web:
address: 192.0.2.1
protocol: tcp
port: 80
backends: [web0, web1]
```
See [docs/config-guide.md](docs/config-guide.md) for the full configuration reference.
## Docker
```sh
docker build -t maglevd .
docker run --cap-add NET_RAW -v /etc/maglev:/etc/maglev maglevd
```