Add LICENSE and README + config-guide
This commit is contained in:
64
README.md
Normal file
64
README.md
Normal 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
|
||||
```
|
||||
Reference in New Issue
Block a user