Skip to main content

Module cog_kind

Module cog_kind 

Source
Expand description

The cog kind’s requirements (ADR-100 section 2): how a verified cog package becomes a placement WorkloadSpec.

Per binary arch, three routes, in the order a kind prefers them:

  • <arch>-native: cpu.arch.<arch>, os.linux (cog binaries are Linux ELF) and a runtime.native whose arches_native has the arch;
  • <arch>-container: a runtime.container.* running the arch natively;
  • <arch>-emulated: a runtime.container.* emulating the arch (placed only when the operator sets allow_emulated).

Memory is [resources].ram_mb; the policy needs a paired node (native isolation is weak until landlock / seccomp, ADR-100 section 3) and lists the package id, signer keys and artifact hashes as revocable refs.

Functions§

arch_of
The arch a variant name starts with.
arch_routes
The three routes for one arch.
cog_workload_spec
Placement spec for a verified cog package (signed packages only; store pins are placed on an operator-assigned Seed node id, not by requirements).
route_of
The route kind a variant name ends with (native, container, emulated), which the target maps to an adapter.