Documentation
¶
Overview ¶
Package artifacts handles acquiring and caching source Talos artifacts.
Index ¶
- Constants
- func DescriptorFromOCIPath(path string, arch Arch) (v1.Descriptor, error)
- func ValidArch(s string) bool
- type Arch
- type ErrNotFoundTag
- type ExtensionRef
- type ImageDependency
- type ImageVerifyOptions
- type Kind
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) ExtractExtensionSPDX(ctx context.Context, arch Arch, ref ExtensionRef) ([]imagehandler.SPDXFile, error)
- func (m *Manager) Get(ctx context.Context, versionString string, arch Arch, kind Kind) (string, error)
- func (m *Manager) GetBrokenTalosVersions() []semver.Version
- func (m *Manager) GetExtensionDependency(ctx context.Context, arch Arch, ref ExtensionRef) (ImageDependency, error)
- func (m *Manager) GetExtensionImage(ctx context.Context, arch Arch, ref ExtensionRef) (string, error)
- func (m *Manager) GetInstallerDependency(ctx context.Context, arch Arch, versionString string) (ImageDependency, error)
- func (m *Manager) GetInstallerImage(ctx context.Context, arch Arch, versionString string) (string, error)
- func (m *Manager) GetOfficialExtensions(ctx context.Context, versionString string) ([]ExtensionRef, error)
- func (m *Manager) GetOfficialOverlays(ctx context.Context, versionString string) ([]OverlayRef, error)
- func (m *Manager) GetOverlayArtifact(ctx context.Context, arch Arch, ref OverlayRef, kind OverlayKind) (string, error)
- func (m *Manager) GetOverlayDependency(ctx context.Context, arch Arch, ref OverlayRef) (ImageDependency, error)
- func (m *Manager) GetOverlayImage(ctx context.Context, arch Arch, ref OverlayRef) (string, error)
- func (m *Manager) GetSchematicExtension(ctx context.Context, versionTag string, schematic *schematic.Schematic) (string, error)
- func (m *Manager) GetTalosVersions(ctx context.Context) ([]semver.Version, error)
- func (m *Manager) GetTalosctlImage(ctx context.Context, versionString string) (string, error)
- func (m *Manager) GetTalosctlTuples(ctx context.Context, versionString string) ([]TalosctlTuple, error)
- func (m *Manager) InstallerImageName(versionTag string) string
- type Options
- type OverlayKind
- type OverlayRef
- type TalosctlDownload
- type TalosctlService
- type TalosctlSource
- type TalosctlTuple
Constants ¶
const FetchTimeout = 20 * time.Minute
FetchTimeout controls overall timeout for fetching artifacts for a release.
Variables ¶
This section is empty.
Functions ¶
func DescriptorFromOCIPath ¶ added in v1.5.0
func DescriptorFromOCIPath(path string, arch Arch) (v1.Descriptor, error)
DescriptorFromOCIPath resolves the manifest descriptor for arch from an OCI image layout.
Types ¶
type ErrNotFoundTag ¶ added in v0.2.1
type ErrNotFoundTag struct{}
ErrNotFoundTag tags the errors when the artifact is not found.
type ExtensionRef ¶
type ExtensionRef struct {
TaggedReference name.Tag
Digest string
Description string
Author string
// contains filtered or unexported fields
}
ExtensionRef is a ref to the extension for some Talos version.
type ImageDependency ¶ added in v1.5.0
ImageDependency identifies the exact platform manifest consumed from an OCI image.
type ImageVerifyOptions ¶ added in v0.9.0
type ImageVerifyOptions = verify.VerifyOptions
ImageVerifyOptions are the options for verifying the image signature.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager supports loading, caching and serving Talos release artifacts.
func NewManager ¶
NewManager creates a new artifacts manager.
func (*Manager) ExtractExtensionSPDX ¶ added in v1.1.0
func (m *Manager) ExtractExtensionSPDX(ctx context.Context, arch Arch, ref ExtensionRef) ([]imagehandler.SPDXFile, error)
ExtractExtensionSPDX extracts SPDX files from an extension image.
func (*Manager) Get ¶
func (m *Manager) Get(ctx context.Context, versionString string, arch Arch, kind Kind) (string, error)
Get returns the artifact path for the given version, arch and kind.
func (*Manager) GetBrokenTalosVersions ¶ added in v1.3.3
GetBrokenTalosVersions returns the list of Talos versions marked as broken in the configuration.
func (*Manager) GetExtensionDependency ¶ added in v1.5.0
func (m *Manager) GetExtensionDependency(ctx context.Context, arch Arch, ref ExtensionRef) (ImageDependency, error)
GetExtensionDependency resolves the exact extension platform manifest used by a build.
func (*Manager) GetExtensionImage ¶
func (m *Manager) GetExtensionImage(ctx context.Context, arch Arch, ref ExtensionRef) (string, error)
GetExtensionImage pulls and stores in OCI layout an extension image.
func (*Manager) GetInstallerDependency ¶ added in v1.5.0
func (m *Manager) GetInstallerDependency(ctx context.Context, arch Arch, versionString string) (ImageDependency, error)
GetInstallerDependency resolves the exact base Installer platform manifest used by a build.
func (*Manager) GetInstallerImage ¶
func (m *Manager) GetInstallerImage(ctx context.Context, arch Arch, versionString string) (string, error)
GetInstallerImage pulls and stores in OCI layout installer-base image.
func (*Manager) GetOfficialExtensions ¶
func (m *Manager) GetOfficialExtensions(ctx context.Context, versionString string) ([]ExtensionRef, error)
GetOfficialExtensions returns a list of Talos extensions per Talos version available.
func (*Manager) GetOfficialOverlays ¶ added in v0.3.0
func (m *Manager) GetOfficialOverlays(ctx context.Context, versionString string) ([]OverlayRef, error)
GetOfficialOverlays returns a list of overlays per Talos version available.
func (*Manager) GetOverlayArtifact ¶ added in v0.7.1
func (m *Manager) GetOverlayArtifact(ctx context.Context, arch Arch, ref OverlayRef, kind OverlayKind) (string, error)
GetOverlayArtifact returns the artifact path for the given version, arch and kind.
func (*Manager) GetOverlayDependency ¶ added in v1.5.0
func (m *Manager) GetOverlayDependency(ctx context.Context, arch Arch, ref OverlayRef) (ImageDependency, error)
GetOverlayDependency resolves the exact overlay platform manifest used by a build.
func (*Manager) GetOverlayImage ¶ added in v0.3.0
GetOverlayImage pulls and stores in OCI layout an overlay image.
func (*Manager) GetSchematicExtension ¶
func (m *Manager) GetSchematicExtension(ctx context.Context, versionTag string, schematic *schematic.Schematic) (string, error)
GetSchematicExtension returns a path to the tarball with "virtual" extension matching a specified schematic.
func (*Manager) GetTalosVersions ¶
GetTalosVersions returns a list of Talos versions available. The caller may reorder the returned slice without changing the cached list.
func (*Manager) GetTalosctlImage ¶ added in v0.7.5
GetTalosctlImage pulls and stores in OCI layout talosctl-all image.
func (*Manager) GetTalosctlTuples ¶ added in v0.7.5
func (m *Manager) GetTalosctlTuples(ctx context.Context, versionString string) ([]TalosctlTuple, error)
GetTalosctlTuples returns a list of Talosctl tuples for the given version.
func (*Manager) InstallerImageName ¶ added in v0.9.0
InstallerImageName returns an installer image name based on Talos version.
type Options ¶
type Options struct {
// ImageRegistry is the registry which stores imager, extensions, etc..
//
// For official images, this is "ghcr.io".
ImageRegistry string
// ImageRegistryNamespace is an optional repository path prefix (e.g. a Harbor
// proxy-cache project) prepended to every image pulled from ImageRegistry,
// including extension and overlay images discovered via the manifests.
ImageRegistryNamespace string
// Repository to source extra extensions from.
ExtraExtensionsImageRegistry string
// Allow using an image registry without TLS.
InsecureImageRegistry bool
// Allow using an image registry without TLS for extra extensions.
InsecureExtraExtensionsRegistry bool
// MinVersion is the minimum version of Talos to use.
MinVersion semver.Version
// BrokenVersions are Talos versions that should be rejected when listing available versions.
BrokenVersions []semver.Version
// ImageVerifyOptions are the options for verifying the image signature.
ImageVerifyOptions ImageVerifyOptions
// TalosVersionRecheckInterval is the interval for rechecking Talos versions.
TalosVersionRecheckInterval time.Duration
// RemoteOptions is the list of remote options for the puller.
RemoteOptions []remote.Option
// RegistryRefreshInterval is the interval for refreshing the image registry connections.
RegistryRefreshInterval time.Duration
// Images used by the artifacts manager.
InstallerBaseImage string
InstallerImage string
ImagerImage string
ExtensionManifestImage string
ExtraExtensionManifestImage string
OverlayManifestImage string
TalosctlImage string
// External identification.
ExternalURL string
}
Options are the options for the artifacts manager.
type OverlayKind ¶ added in v0.7.1
type OverlayKind string
OverlayKind if the kind of overlay artifacts.
const (
OverlayKindProfiles OverlayKind = "profiles"
)
Supported overlay kinds.
type OverlayRef ¶ added in v0.3.0
OverlayRef is a ref to the overlay for some Talos version.
type TalosctlDownload ¶ added in v1.7.2
type TalosctlDownload struct {
Reader io.ReadCloser
Version string
Filename string
Size int64
}
TalosctlDownload is an opened talosctl binary.
type TalosctlService ¶ added in v1.7.2
type TalosctlService struct {
// contains filtered or unexported fields
}
TalosctlService owns talosctl release lookup and file access.
func NewTalosctlService ¶ added in v1.7.2
func NewTalosctlService(source TalosctlSource) *TalosctlService
NewTalosctlService creates a talosctl application service.
func (*TalosctlService) List ¶ added in v1.7.2
List returns the normalized version and available talosctl filenames.
func (*TalosctlService) Open ¶ added in v1.7.2
func (service *TalosctlService) Open(ctx context.Context, version, filename string, withBody bool) (TalosctlDownload, error)
Open opens one talosctl binary for delivery.
type TalosctlSource ¶ added in v1.7.2
type TalosctlSource interface {
GetTalosctlTuples(ctx context.Context, version string) ([]TalosctlTuple, error)
GetTalosctlImage(ctx context.Context, version string) (string, error)
}
TalosctlSource retrieves talosctl release metadata and files.
type TalosctlTuple ¶ added in v0.7.5
TalosctlTuple represents a OS/Arch/Ext tuple for talosctl binaries.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package imagehandler holds helpers for working with oci images.
|
Package imagehandler holds helpers for working with oci images. |