Documentation
¶
Overview ¶
Package bootstrapartifacts defines and reads complete agent bootstrap artifact bundles.
Index ¶
- Constants
- Variables
- func CNIArtifactPath(version, arch string) string
- func ContainerImageArchivePath(arch, imageTag string) string
- func ContainerdArtifactPath(version, arch string) string
- func CrictlArtifactPath(version, hostOS, arch string) string
- func KubernetesArtifactPath(version, arch, binary string) string
- func NormalizeContainerImages(images []string) []string
- func NormalizeKubernetesVersion(version string) string
- func RequiredPaths(manifest Manifest, hostOS, arch string) []string
- func RuncArtifactPath(version, arch string) string
- func SourceKey(source string) string
- func StripLeadingV(version string) string
- type Bundle
- type ContentDiff
- type Manifest
- type ResolveOptions
- type Versions
Constants ¶
const ManifestFileName = "manifest.json"
Variables ¶
var KubernetesBinaries = []string{"kubelet", "kubectl", "kube-proxy"}
Functions ¶
func CNIArtifactPath ¶
func ContainerdArtifactPath ¶
func CrictlArtifactPath ¶
func KubernetesArtifactPath ¶
func RequiredPaths ¶
RequiredPaths returns the artifacts required by agent bootstrap for one host architecture.
func RuncArtifactPath ¶
func SourceKey ¶
SourceKey returns a filesystem-safe source identity key. Signed HTTP(S) query parameters are excluded so credential rotation reuses the same key.
func StripLeadingV ¶
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 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 ¶
ContentDiff describes differences between expected and available bundle paths.
func CompareContents ¶
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 ¶
NormalizeManifest validates and normalizes a bootstrap artifact manifest.
type ResolveOptions ¶
type ResolveOptions struct {
HTTPSArchiveRoot string
}
ResolveOptions configures HTTPS archive-backed bundle resolution.