JR2Config
Type, in @jr2/orchestrator/src/config.ts. It is an export of @jr2/orchestrator, on the Authoring surface page, in Config.
type JR2Config = {
name?: string;
secrets?: readonly SecretEntry[];
git?: GitConfig;
harness?: HarnessConfig;
sandbox?: SandboxConfig;
priorityClasses?: PriorityClasses;
registry?: string;
kitRegistry?: string;
platforms?: readonly string[];
operator?: {
manage?: boolean;
};
};The shape of jr2.config.ts: the deployment facts of an Instance, which a Machine cannot carry. It holds the Instance's name, its secrets, how the cluster authenticates to Repos, what the Harness can reach, where Sandboxes run, and where images go. It names no Repo, no model and no Sandbox Image: a Machine names those itself.
Every field is optional, and an Instance can run with no jr2.config.ts. Write the file as export default defineConfig({ … }). When the config loads, a file with no default export is refused: <file> has no default export (use `export default defineConfig({…})`). The load also checks the shape of git.credentials, secrets, harness.catalog and priorityClasses. It checks that sandbox is an object, and checks its resources. Each refusal names the field. jr2 up checks the rest.
Fields
name(optional):stringThe Instance's name. Its Kubernetes namespace is this name (
-noverrides it), andjr2 uplabels every object that it owns with it. Default: the name of the Instance folder.secrets(optional):readonly SecretEntry[]Every secret of the Instance, in one list. A secret goes where something names it. A Held secret goes where a
workspace()lists it undersecretsor an Agent's provider reads it. An Effect secret goes where an Effect names it withsecret("name"). Itshostsis a Held secret's binding, never its placement: an entry that nothing names goes nowhere. A model API key goes here, never inharness.env. SeeSecretEntry. Each entry is checked when the config loads:<file> at secrets[<i>]<path>: <problem>, followed by the shape of an entry.git(optional):GitConfigHow the cluster authenticates to Repos, and the fence that a per-run url must pass. It is not a list of Repos: a Machine names its Repos in the Repo Slots of its
workspace(). SeeGitConfig.harness(optional):HarnessConfigWhat the Harness can reach: a custom model provider, gateways for catalog providers, env vars, and CAs. See
HarnessConfig.sandbox(optional):SandboxConfigWhich nodes are Sandbox nodes, and the Size of a Workspace that states none. Default: a Sandbox runs wherever an ordinary pod runs, at the kit's Size. See
SandboxConfig.priorityClasses(optional):PriorityClassesExisting PriorityClasses to use in place of the two that
jr2 upcreates. SeePriorityClasses.registry(optional):stringThe image registry prefix to which
jr2 uppushes the images that it builds, such asregistry.example.com/team. It changes between deployments, so read it fromprocess.env(.env). Default: none;jr2 uploads the images into the kind cluster. On a cluster that is not kind,jr2 upthen refuses:context <context> is not a kind cluster and no `registry` is configured.kitRegistry(optional):stringThe registry from which this cluster pulls the published Kit images: a mirror for a cluster that is self-hosted, air-gapped, or mirror-only. Default: none; the cluster pulls from the canonical home,
ghcr.io/snapwich/jr2-harness:<version>and the others. Set, the cluster pulls the same tags from<kitRegistry>/jr2-harness:<version>. Fill the mirror withjr2 kit push <registry>;jr2 upnever pushes to it. Read it fromprocess.env(.env).platforms(optional):readonly string[]The platforms for which
jr2 upbuilds its images, as docker platform strings, such as["linux/arm64"]. Default: the platforms of the cluster's schedulable nodes that the kit releases images for.jr2 upreports a node platform that it skips.Set it when the nodes cannot tell. One case is a node group that scales up from zero. Another is a set of nodes that need no image, such as an amd64 GPU group beside arm64 nodes. When you set it, it replaces the default. It adds to nothing and removes from nothing. The kit releases images for
linux/amd64andlinux/arm64only, sojr2 uprefuses any other:`platforms` names <platforms> — the kit releases images for linux/amd64, linux/arm64 and nothing else.operator(optional):objectSettings of the operator layer, for kit development.
manage(optional):booleanfalse:jr2 updoes not converge the operator, and you run its controller yourself. Default:true.
Example
import { defineConfig, type JR2Config } from "@jr2/orchestrator";
const harness: JR2Config["harness"] = {
provider: {
id: "vllm",
api: "openai-completions",
baseUrl: process.env.VLLM_URL ?? "",
models: { "Qwen/Qwen3.6-35B-A3B": { contextWindow: 131072, maxTokens: 16384 } },
},
};
export default defineConfig({ name: "my-instance", harness });See also