bootstrapartifacts

package
v0.1.24-rc.14 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package bootstrapartifacts defines and reads complete agent bootstrap artifact bundles.

Index

Constants

View Source
const ManifestFileName = "manifest.json"

Variables

View Source
var KubernetesBinaries = []string{"kubelet", "kubectl", "kube-proxy"}

Functions

func CNIArtifactPath

func CNIArtifactPath(version, arch string) string

func ContainerImageArchivePath

func ContainerImageArchivePath(arch, imageTag string) string

func ContainerdArtifactPath

func ContainerdArtifactPath(version, arch string) string

func CrictlArtifactPath

func CrictlArtifactPath(version, hostOS, arch string) string

func KubernetesArtifactPath

func KubernetesArtifactPath(version, arch, binary string) string

func NormalizeContainerImages

func NormalizeContainerImages(images []string) []string

func NormalizeKubernetesVersion

func NormalizeKubernetesVersion(version string) string

func RequiredPaths

func RequiredPaths(manifest Manifest, hostOS, arch string) []string

RequiredPaths returns the artifacts required by agent bootstrap for one host architecture.

func RuncArtifactPath

func RuncArtifactPath(version, arch string) string

func SourceKey

func SourceKey(source string) string

SourceKey returns a filesystem-safe source identity key. Signed HTTP(S) query parameters are excluded so credential rotation reuses the same key.

func StripLeadingV

func StripLeadingV(version string) string

Types

type Bundle

type Bundle interface {
	// Root returns the normalized filesystem path or OCI reference identifying
	// the bundle root.
	Root() string

	// Artifact resolves a bundle-relative path into an openable artifact source.
	Artifact(path string) (artifactsource.Source, error)

	// ArtifactURL returns the source URL for a bundle-relative path. The path may
	// contain format verbs used later when resolving download overrides.
	ArtifactURL(path string) string

	// List returns the sorted bundle-relative paths of all available artifacts.
	// For OCI bundles, it fetches the selected platform manifest once and lists
	// descriptor titles without downloading artifact contents.
	List(ctx context.Context) ([]string, error)
}

Bundle provides read access to a collection of bootstrap artifacts.

func Open

func Open(raw string) (Bundle, error)

Open opens a local or OCI bootstrap artifact bundle root.

func Resolve

func Resolve(ctx context.Context, raw string, opts ResolveOptions) (bundle Bundle, markValidated func() error, err error)

Resolve opens a local or OCI bundle, or materializes an HTTPS archive as a local bundle. For HTTPS archives, markValidated must be called after caller-specific bundle validation succeeds.

type ContentDiff

type ContentDiff struct {
	Missing    []string
	Unexpected []string
}

ContentDiff describes differences between expected and available bundle paths.

func CompareContents

func CompareContents(ctx context.Context, bundle Bundle, expected []string) (ContentDiff, error)

CompareContents compares expected paths with the paths available in bundle.

type Manifest

type Manifest struct {
	SchemaVersion   int      `json:"schemaVersion,omitempty"`
	Versions        Versions `json:"versions"`
	ContainerImages []string `json:"containerImages"`
}

Manifest describes a complete bootstrap artifact bundle.

func NormalizeManifest

func NormalizeManifest(manifest Manifest) (Manifest, error)

NormalizeManifest validates and normalizes a bootstrap artifact manifest.

type ResolveOptions

type ResolveOptions struct {
	HTTPSArchiveRoot string
}

ResolveOptions configures HTTPS archive-backed bundle resolution.

type Versions

type Versions struct {
	Kubernetes string `json:"kubernetes"`
	Containerd string `json:"containerd"`
	Runc       string `json:"runc"`
	CNI        string `json:"cni"`
	Crictl     string `json:"crictl"`
}

Versions records component versions in a bootstrap artifact bundle.

Jump to

Keyboard shortcuts

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