Validation and Application
The CLI runs the same schema inside the component images and keeps no local field allowlist. Validation completes before anything is written, so a failure changes no files and starts no containers.
bash
kurrent config validate # Control-plane declaration
kurrent config validate --node # Node declaration
kurrent config show # Effective declaration with defaults injectedValidation Rules
| Rule | Behavior |
|---|---|
extra="forbid" | Unknown fields, typos and old keys are rejected |
| Default injection | Missing policy blocks use schema defaults |
| Cross-field checks | Subnet/gateway/pool consistency, token TTL caps, certificate day caps and more |
| Paths/NQN | Absolute paths, NQN namespace and addresses are validated at declaration time; node identity is checked against the state file by join |
| Version lock | apiVersion and kind must match |
Applying to the Control Plane
bash
kurrent init- build the validation image (internal step);
- validate the declaration with the runtime schema inside the image;
- apply the declaration to
control_plane/kurrent.yaml; - start or recreate containers and restart the control plane;
- wait for
/healthz; a failed startup derivation returns 503; - confirm dnsmasq stays running.
On any failure: validation failures write nothing; startup failures restore the previous declaration, restart the control plane and dnsmasq, and return a non-zero exit code.
Applying to a Storage Node
bash
kurrent join <cp-url> [--token <token>]- read or generate the node declaration;
- merge defaults and validate with the same schema inside the agent image;
- write
storager/state/agent.idand boot credentials under the node state root (first run needs--agent-id); - inject compose variables from
diskDir, the node state root and trust anchors, start the agent and confirm it stays running; - for the nvmet backend, pre-check host prerequisites (kernel modules, configfs,
tlshd >= 1.5.0) and restart nvmet-host after derived credentials arrive.
A failed declaration validation writes no files.
What's next
- Back to Declarative Configuration
- Control-plane declaration: Control-Plane Declaration
- Node declaration: Node Declaration
- Runtime state and drift: Drift and Overrides