karios-ipam is a Go library that provides DNS/DHCP (DDI) management for
the Karios platform.
It wraps an underlying DNS/DHCP provider behind a single NetworkManager
interface for DHCP reservations and DNS zone/record management. Supported
providers: Technitium (default), external-dhcp (file-export for a
customer-managed DHCP server), and none/static (Karios does not manage
DNS/DHCP).
This is a library, not a standalone service — it is imported and run as
part of a host application (e.g. karios-apis).
- Go (version as specified in
go.mod) - Git
- Make
On Debian/Ubuntu, build dependencies can be installed via:
make deb-deps
# or manually:
sudo apt-get update
sudo apt-get install -y golang-go git makego mod downloadmake buildSince this is a library, "running" it means running its test suite:
make testmake verify # fmt + vet + build + testOn Debian, make deb-verify installs build dependencies and then runs the
full verification (fmt, vet, build, test).
| Target | Description |
|---|---|
make or make all
|
Build and verify (default) |
make help |
Show help message |
make build |
Build/verify all packages |
make test |
Run all tests |
make test-verbose |
Run tests with verbose output |
make test-cover |
Run tests with coverage report |
make fmt |
Format Go source code |
make vet |
Run go vet |
make lint |
Run linter (requires golangci-lint) |
make clean |
Clean build artifacts |
make install-deps |
Download dependencies |
make tidy |
Tidy go.mod |
make verify |
Full verification (fmt + vet + build + test) |
make version |
Show version information |
make deb-deps |
Install Debian build dependencies |
make deb-verify |
Full Debian verification |
-
go: command not found— install Go, or on Debian runmake deb-deps. -
package not found— runmake install-deps && make tidy. -
Tests failing — run
make test-verbosefor details. -
Build failing — run
make clean && make build.
These variables configure the underlying DHCP/DNS provider at runtime.
| Variable | Description | Default | Required |
|---|---|---|---|
DHCP_TYPE |
Provider type: technitium, none, static, or external-dhcp
|
technitium |
Yes |
DHCP_HOST |
DHCP/DNS server host | — | Yes (for technitium) |
DHCP_PORT |
DHCP/DNS server port | 5380 |
No |
DHCP_USER |
Username for DHCP/DNS provider | — | No |
DHCP_PASSWORD |
Password for DHCP/DNS provider | — | No |
DHCP_TOKEN |
API token for DHCP/DNS provider | — | No |
DHCP_USE_PROXY |
Use proxy for DHCP/DNS requests (true/false) |
false |
No |
DHCP_TIMEOUT |
Request timeout (seconds) | 30 |
No |
DHCP_SSL |
Use SSL for DHCP/DNS connection (true/false) |
false |
No |
DHCP_INSECURE |
Allow insecure (self-signed) SSL (true/false) |
true |
No |
KARIOS_DHCP_RESERVATIONS_PATH |
Path to the shared reservations JSON file when DHCP_TYPE=external-dhcp
|
/etc/karios/dhcp-reservations.json |
No |
Note: when
DHCP_TYPEisnoneorstatic, no DHCP/DNS provider is created —NetworkManagerClient()returnsnil, and callers should nil-guard and skip DHCP/DNS calls.