Documentation
¶
Index ¶
- Variables
- type ChannelVersionTag
- type ComponentStats
- type ConcurrentWorker
- type ImageDownloadList
- type ImageLayouts
- type Options
- type Service
- func (svc *Service) ExtractImageDigestsFromDeckhouseInstallerNew(tag string, prevDigests map[string]struct{}) (map[string]*puller.ImageMeta, error)
- func (svc *Service) FindVexImage(digest string) (string, error)
- func (svc *Service) PullPlatform(ctx context.Context) error
- func (svc *Service) Stats() ComponentStats
- type VersionsToMirrorResult
Constants ¶
This section is empty.
Variables ¶
var ErrSomeChannelsFailed = errors.New("some channels failed to fetch")
Functions ¶
This section is empty.
Types ¶
type ChannelVersionTag ¶ added in v0.32.6
ChannelVersionTag pairs a release channel with the version tag it currently resolves to ("stable" -> "v1.69.0").
type ComponentStats ¶ added in v0.30.20
type ComponentStats struct {
Attempted bool
Images int
// Versions are the resolved Deckhouse release versions to mirror (e.g.
// ["v1.69.0"]); Channels are the release channels mapped to them. Both are
// resolved by findTagsToMirror before any download, so they are populated in
// dry-run as well.
Versions []string
Channels []string
}
ComponentStats is the platform phase's image accounting, mapped into the top-level summary by the pull orchestrator.
type ConcurrentWorker ¶
type ConcurrentWorker[T, R any] struct { // contains filtered or unexported fields }
func NewConcurrentWorker ¶
func NewConcurrentWorker[T, R any](workersCount int) *ConcurrentWorker[T, R]
type ImageDownloadList ¶ added in v0.22.4
type ImageDownloadList struct {
Deckhouse map[string]*puller.ImageMeta
DeckhouseExtra map[string]*puller.ImageMeta
DeckhouseInstall map[string]*puller.ImageMeta
DeckhouseInstallStandalone map[string]*puller.ImageMeta
DeckhouseReleaseChannel map[string]*puller.ImageMeta
// contains filtered or unexported fields
}
func NewImageDownloadList ¶ added in v0.22.4
func NewImageDownloadList(rootURL string) *ImageDownloadList
func (*ImageDownloadList) FillDeckhouseImages ¶ added in v0.22.4
func (l *ImageDownloadList) FillDeckhouseImages(deckhouseVersions []string)
func (*ImageDownloadList) FillForChannels ¶ added in v0.28.2
func (l *ImageDownloadList) FillForChannels(channels []string)
FillForChannels enqueues only release-channel:<channel> DOWNLOADS (e.g. release-channel:stable). The main Deckhouse and Install repositories are intentionally left out of the download list even though the bundle does end up carrying <root>/install:<channel>: channel names like "alpha", "stable" or "lts" are just aliases for the corresponding version tag, so downloading <root>:<channel> on top of <root>:<vX.Y.Z> would duplicate work in the best case and fail in the worst case — e.g. when re-pulling from a registry that received a `d8 mirror push` of a tag-based bundle, where those repositories carry version tags only.
The install aliases are instead produced after the pull by propagateChannelAliases in platform.go, which re-tags the image already in the layout: same result in the destination registry, no extra traffic, and no dependency on the source registry publishing the channel tags itself. The main Deckhouse repository gets no channel tags at all - it is addressed by version, and channel metadata lives in release-channel.
type ImageLayouts ¶
type ImageLayouts struct {
Deckhouse *regimage.ImageLayout
DeckhouseInstall *regimage.ImageLayout
DeckhouseInstallStandalone *regimage.ImageLayout
DeckhouseReleaseChannel *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 the layout.Path of every defined sub-layout. Nil sub-layouts (for example, those never created in dry-run) are skipped.
type Options ¶ added in v0.24.3
type Options struct {
// SinceVersion specifies the minimum version to start mirroring from (optional)
SinceVersion *semver.Version
// IncludeConstraint narrows platform release discovery to a user-supplied
// semver constraint expression, mirroring the per-module constraint syntax
// accepted by --include-module. When set it replaces the default discovery
// window (rock-solid..alpha) — only registry tags matching the constraint
// are pulled, latest-patch-per-(major, minor) collapsing applies and
// release channels pointing outside the constraint are filtered out.
//
// IncludeConstraint is mutually exclusive with TargetTag: pinning one tag
// and selecting a range simultaneously is contradictory and the CLI
// rejects that combination before reaching this layer.
IncludeConstraint modules.VersionConstraint
// TargetTag specifies a specific tag to mirror instead of determining versions automatically
// it can be:
// semver f.e. vX.Y.Z
// channel f.e. alpha/beta/stable
// any other tag
TargetTag string
// 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
// IgnoreSuspend allows mirroring even if release channels are suspended
IgnoreSuspend bool
// SkipVexImages allows skipping VEX images
SkipVexImages bool
// Timeout is the timeout for the platform access check
Timeout time.Duration
// DryRun prints the pull plan without downloading any image blobs
DryRun bool
// ProxyRegistry replaces catalog-based release discovery (ListTags
// of the deckhouse release-channel repo) with a sequential probe of
// individual version tags derived from IncludeConstraint. It exists
// for proxy/caching registries that do not implement the registry
// catalog API but DO serve manifests for tags they cache.
//
// The CLI requires IncludeConstraint when ProxyRegistry is set so
// the probe has a defined starting point — without a lower bound
// from the user the probe would have to start from 0.0.0 and would
// never find anything.
ProxyRegistry bool
}
Options contains configuration options for the platform service
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) ExtractImageDigestsFromDeckhouseInstallerNew ¶
func (*Service) PullPlatform ¶
PullPlatform pulls the Deckhouse platform images and metadata It validates access to the registry, determines which versions to mirror, and prepares the image layouts for mirroring
func (*Service) Stats ¶ added in v0.30.20
func (svc *Service) Stats() ComponentStats
Stats returns image accounting for the platform phase. In dry-run it reports planned counts from the download list; otherwise it reports the actual number of manifests pulled into the OCI layouts, captured before packing (see Service.pulledImages).
type VersionsToMirrorResult ¶ added in v0.28.2
type VersionsToMirrorResult struct {
// Versions contains semver versions to mirror
Versions []semver.Version
// Channels contains release channels to mirror
Channels []string
// ChannelVersions pairs every channel in Channels with the version tag it
// points at, so callers can re-tag the pulled images with channel aliases
// without asking the registry again.
ChannelVersions []ChannelVersionTag
// CustomTags contains custom tags (non-semver, non-channel tags) to mirror
CustomTags []string
}
VersionsToMirrorResult contains the result of versionsToMirror operation