Command-Line Tools¶
Besides the mock libraries, Mokka ships a set of small binaries under cmd/.
The chart runs most of them for you. The kubelet helper runs through systemd;
nvml-mock-ctl is meant to be invoked by hand.
| Component | Purpose |
|---|---|
node-agent |
Compiles a mock NVML profile into on-host state and keeps it reconciled. The process the nvml-mock DaemonSet runs. |
nri-plugin |
containerd NRI plugin that injects the mock driver overlay, LD_PRELOAD shims and device nodes into containers at creation time. |
control-plane |
Runs the Mokka control plane and serves liveness and controller-readiness probes. |
nvml-mock-ctl |
Mutate the simulated GPU state of a running node without a restart. |
Three more are documented under Contributing:
check-fabric, which prints the NVLink fabric identity
(cluster UUID, clique ID, state) of every visible GPU,
generate-bridge, which generates the mock NVML bridge
stubs, and mokka-capture, which captures a real GPU node
and scrubs the capture for the repository.
Building¶
make build compiles every cmd/*/main.go into dist/, then does the same for
the Go shims under shims/.
The nvml-mock image installs node-agent, mokka-kubelet-helper, nri-plugin,
nvml-mock-ctl and check-fabric under /usr/local/bin. control-plane has an image
of its own, built from deployments/control-plane/Dockerfile, and
generate-bridge and mokka-capture are developer tools that ship in neither.