bundler

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package bundler turns a pod.Container into an OCI runtime bundle on disk — the directory + config.json the OCI runtime (runc/crun) consumes.

We don't import github.com/opencontainers/runtime-spec to keep the module dep-free ; we emit only the fields we actually set, and the runtime fills defaults for the rest. The schema is OCI Runtime Specification v1.0.2.

Scope of this MVP:

  • mono-container per pod: each container gets fresh pid/net/ uts/ipc/mount namespaces.
  • pod-style namespace sharing (pause container pattern) is a follow-up: store the first container's PID, then emit `{"type": "network", "path": "/proc/<pid>/ns/net"}` for siblings instead of an empty entry that creates a new ns.

Index

Constants

View Source
const BundlesRoot = "/run/weft/bundles"

BundlesRoot is where Build() places per-container bundle dirs. One dir per container holds the generated config.json ; the rootfs is referenced by absolute path inside that config.

Variables

This section is empty.

Functions

func Build

func Build(podID string, c *pod.Container, rootfsPath string) (string, error)

Build writes a config.json for c into <BundlesRoot>/<c.ID>/. rootfsPath is the absolute path of the container's root filesystem (typically a virtio-fs share mount point). Returns the bundle directory the OCI runtime should be invoked against.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL