artifacts

package
v0.1.24-rc.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ManifestFileName = bootstrapartifacts.ManifestFileName
)

Variables

This section is empty.

Functions

func ArchiveOCIImage

func ArchiveOCIImage(ctx context.Context, sourceRef, archivePath string) error

ArchiveOCIImage copies a tagged image from an OCI registry into a local OCI layout and writes that layout as a gzip-compressed tar archive.

func Build

func Build(ctx context.Context, log *slog.Logger, opts Options) error

func NewStagingDir

func NewStagingDir() (string, func(), error)

func OCIImageArchiveName

func OCIImageArchiveName(sourceRef string) (string, error)

OCIImageArchiveName returns the release archive filename for a tagged OCI image reference. Callers producing multiple archives must reject duplicate names before writing because the filename intentionally omits registry and repository namespace components.

func PushOCI

func PushOCI(ctx context.Context, log *slog.Logger, rootDir, ref string) error

func ValidateBundle

func ValidateBundle(log *slog.Logger, rootDir string) error

ValidateBundle validates a local offline artifact bundle directory. It reads manifest.json, derives the expected artifact paths from that manifest and the detected architectures, compares them to the files on disk, and verifies all checksum sidecars.

func ValidateOCI

func ValidateOCI(ctx context.Context, log *slog.Logger, ref string) error

ValidateOCI pulls each platform from an offline artifact OCI index into a temporary staging directory and validates the pulled content. It verifies that the remote index has the expected artifact type, that each platform manifest has file title annotations on all layers, that each pulled platform bundle contains a valid manifest.json, and that the pulled files match the artifacts implied by manifest.json for that platform.

func WriteBundleArchive

func WriteBundleArchive(rootDir, archivePath string) error

WriteBundleArchive writes rootDir as a deterministic gzip-compressed tar archive and writes an adjacent sha256sum file.

Types

type Artifact

type Artifact struct {
	Name             string
	URL              string
	Path             string
	GenerateChecksum bool
}

type ContainerImageArchive

type ContainerImageArchive struct {
	ImageTag string
	Arch     string
	Path     string
}

type Options

type Options struct {
	OutputDir         string
	StagingDir        string
	ArchivePath       string
	OCIRef            string
	ManifestPath      string
	Manifest          bootstrapartifacts.Manifest
	KubernetesVersion string

	Architectures []string
}

type Plan

type Plan struct {
	Manifest        bootstrapartifacts.Manifest
	Artifacts       []Artifact
	ContainerImages []ContainerImageArchive
}

func NewPlan

func NewPlan(opts Options) (Plan, error)

Jump to

Keyboard shortcuts

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