Skip to content

Kernel image resolution

A project's runtime image is built on the kernel image, and that base must be one exact image: a moving tag would let two builds of the same project start from different kernels. When a node runs a project build, it resolves the kernel version the build asks for into a digest-pinned reference in your registry, and the build starts FROM that reference. This page covers where the kernel image lives, how the version is resolved, what the resolved record holds, and the refusals.

Where the kernel image comes from

flowchart TB
  subgraph BA["build.project.v1 ASSIGNMENT"]
    direction LR
    KC[("project_runtime_kernel_image<br/>build.project_runtime_kernel_image.v1<br/>kernel_version")]
    OR[("orchestration<br/>namespace, workload_identity_ref")]
  end
  subgraph NODE["NODE"]
    direction TB
    TAR[("Tenant artifact runtime<br/>endpoint, repository_root")]
    KI{{"Kernel image resolution"}}
    PL[("Runtime image plan<br/>FROM kernel@sha256:...")]
    TAR --> KI --> PL
  end
  REG[("Your registry<br/>repository_root/kernel:version")]
  KC --> KI
  OR --> KI
  KI <-->|"HEAD manifest,<br/>Docker-Content-Digest"| REG
  PL -->|"Kaniko build"| IMG[("Project runtime image")]

The kernel image is read from your registry, under the same repository root the data plane was installed with, so a project's runtime is built on the kernel published to your registry and pinned by digest in the build's record.

How the version is resolved

  1. The kernel contract must be build.project_runtime_kernel_image.v1, with mode kernel_managed and resolution_owner dataplane. kernel_version defaults to stable and may contain letters, digits and _ . -, up to 128 characters.
  2. The build's orchestration must name a Kubernetes namespace and a workload_identity_ref of the form sa://<namespace>/<name> in that namespace.
  3. The reference to resolve is:
oci://<endpoint>/<repository_root>/kernel:<kernel_version>
  1. The node sends a HEAD for the tag's manifest, accepting OCI and Docker manifests and indexes, and reads the digest from the Docker-Content-Digest header. It authenticates with short-lived credentials your cloud provider issues to its build workload through its infrastructure identity, the same way it reaches your registry for every other artifact; see Tenant artifact runtime. A registry that answers 401 is asked for a bearer token through its WWW-Authenticate challenge, and the request is repeated with it. Each request has a 20-second limit.
  2. The resolved reference must still be in <repository_root>/kernel, and the digest must be sha256:<64 hex>.

The resolved record

The node returns the kernel contract with four fields added:

{
  "contract_version": "build.project_runtime_kernel_image.v1",
  "mode": "kernel_managed",
  "resolution_owner": "dataplane",
  "kernel_version": "stable",
  "resolved_image_ref": "oci://us-docker.pkg.dev/acme-prod/xratu/kernel:stable@sha256:8c1e...",
  "resolved_image_digest": "sha256:8c1e...",
  "resolved_workload_identity_ref": "sa://xratu-build/xratu-builder",
  "resolution_source": "registry_tag"
}

The build's runtime image plan then starts from that reference:

base_image_ref        the resolved reference, pinned by digest
dockerfile_base_line  FROM <base_image_ref>
build_steps           copy_project_artifact
                      install_python_executor_package
                      write_runtime_contract
                      set_execution_startup_entrypoint

Both documents are carried in the build's result, so the kernel digest a project runtime was built on can be read from its build record. The project's runtime deploy contract then pins the resulting runtime image by its own digest. See Executor runtime and control tasks.

When resolution fails

A failure refuses the build with code INVALID_ARGUMENT and the message runtime kernel image resolution failed: followed by the reason:

Reason Condition
project runtime kernel image contract_version is invalid The kernel contract has another version
project runtime kernel image mode must be kernel_managed The kernel contract names another mode
project runtime kernel image resolution_owner must be dataplane Another owner is named
project runtime kernel image kernel_version is invalid The version has disallowed characters or is too long
orchestration workload_identity_ref namespace mismatch The workload identity is in another namespace
setup registry endpoint is required for kernel image resolution The node has no tenant artifact runtime
registry manifest lookup failed: http <status> The registry refused the lookup
registry manifest lookup did not return canonical digest The response had no usable Docker-Content-Digest
resolved runtime kernel image repository mismatch The resolved reference left <repository_root>/kernel

A registry manifest lookup failed: http 404 means no kernel image is published under that version in your registry; check the tag exists under <repository_root>/kernel.