Documentation
¶
Overview ¶
Package packages mirrors Deckhouse "packages", which are structurally identical to modules but live under a different set of registry segments:
<root>/packages/<name>:<version> - package main image <root>/packages/<name>/version:<channel> - package version-channel metadata <root>/packages/<name>/version:<vX.Y.Z> - package version-tagged release metadata <root>/packages/<name>/extra/<extra>:<tag> - package extra images
The pull pipeline, filtering and version selection are intentionally the same as for modules, so the generic version-selection vocabulary (Filter, Module, VersionConstraint, ProbeAvailableVersions) is reused from the modules package rather than duplicated here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LayoutHasManifests ¶
LayoutHasManifests reports whether the OCI layout at the given path contains at least one image manifest.
Types ¶
type ImageDownloadList ¶
type ImageDownloadList struct {
Package map[string]*puller.ImageMeta
PackageVersionChannels map[string]*puller.ImageMeta
PackageExtra map[string]*puller.ImageMeta
// contains filtered or unexported fields
}
func NewImageDownloadList ¶
func NewImageDownloadList(rootURL string) *ImageDownloadList
type ImageLayouts ¶
type ImageLayouts struct {
// Packages is the main package image layout (packages/<name>/)
Packages *regimage.ImageLayout
// PackageVersionChannels is the version channel layout (packages/<name>/version/)
PackageVersionChannels *regimage.ImageLayout
// ExtraImages holds layouts for each extra image (packages/<name>/extra/<extra-name>/)
// Key is the extra image name.
ExtraImages map[string]*regimage.ImageLayout
// contains filtered or unexported fields
}
func NewImageLayouts ¶
func NewImageLayouts(rootFolder string) *ImageLayouts
func (*ImageLayouts) AsList ¶
func (l *ImageLayouts) AsList() []layout.Path
AsList returns a list of layout.Path's in it. Undefined path's are not included in the list.
func (*ImageLayouts) GetOrCreateExtraLayout ¶
func (l *ImageLayouts) GetOrCreateExtraLayout(extraName string) (*regimage.ImageLayout, error)
GetOrCreateExtraLayout returns or creates a layout for a specific extra image. Extra images are stored under: packages/<name>/extra/<extra-name>/
func (*ImageLayouts) HasImages ¶
func (l *ImageLayouts) HasImages() bool
HasImages reports whether any sub-layout of this package contains at least one image manifest. Returns false when all layouts are empty (i.e. the package was discovered but no images were pulled into it).
type Options ¶
type Options struct {
// Filter is the package filter (whitelist/blacklist). It reuses the
// modules filter because package selection works exactly like module
// selection (names + semver constraints).
Filter *modules.Filter
// OnlyExtraImages pulls only extra images without main package images
OnlyExtraImages bool
// SkipVexImages allows skipping VEX images
SkipVexImages bool
// BundleDir is the directory to store the bundle
BundleDir string
// BundleChunkSize is the max size of bundle chunks in bytes (0 = no chunking)
BundleChunkSize int64
// Timeout is the timeout for the packages access check
Timeout time.Duration
// DryRun prints the pull plan without downloading any image blobs
DryRun bool
// ProxyRegistry replaces catalog-based discovery with a sequential probe
// of individual version tags derived from the user's --include-package
// version constraint. See the modules service for the full rationale.
ProxyRegistry bool
}
Options contains configuration options for the packages service.
type PackagesDownloadList ¶
type PackagesDownloadList struct {
// contains filtered or unexported fields
}
func NewPackagesDownloadList ¶
func NewPackagesDownloadList(rootURL string) *PackagesDownloadList
func (*PackagesDownloadList) Package ¶
func (l *PackagesDownloadList) Package(packageName string) *ImageDownloadList
type PackagesImageLayouts ¶
type PackagesImageLayouts struct {
// contains filtered or unexported fields
}
func NewPackagesImageLayouts ¶
func NewPackagesImageLayouts(rootFolder string) *PackagesImageLayouts
func (*PackagesImageLayouts) AsList ¶
func (l *PackagesImageLayouts) AsList() []layout.Path
AsList returns a list of layout.Path's from all packages. Undefined path's are not included in the list.
func (*PackagesImageLayouts) Package ¶
func (l *PackagesImageLayouts) Package(packageName string) *ImageLayouts
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) PullPackageVersions ¶
PullPackageVersions pulls the release/version images of every package and packs them into a single shared archive (package-versions.tar).
Unlike PullPackages this runs on EVERY mirror operation, independently of which components are being mirrored and of the --no-packages flag, so the package release-image catalog is always cloned into the bundle. Release images may therefore be duplicated between this archive and the per-package archives produced by PullPackages — that duplication is intentional.