releaseinfo

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 7

Documentation

Index

Constants

View Source
const (
	ReleaseImageStreamFile   = "release-manifests/image-references"
	ReleaseImageMetadataFile = "release-manifests/0000_50_installer_coreos-bootimages.yaml"
)

Variables

This section is empty.

Functions

func DeserializeImageStream

func DeserializeImageStream(data []byte) (*imageapi.ImageStream, error)

Types

type CachedProvider

type CachedProvider struct {
	Cache map[string]*ReleaseImage
	Inner Provider
	// contains filtered or unexported fields
}

CachedProvider maintains a simple cache of release image info and only queries the embedded provider when there is no cache hit.

func (*CachedProvider) Lookup

func (p *CachedProvider) Lookup(ctx context.Context, image string, pullSecret []byte) (releaseImage *ReleaseImage, err error)

type ComponentVersion

type ComponentVersion struct {
	Version     string
	DisplayName string
}

ComponentVersion includes the version and optional display name.

func (ComponentVersion) String

func (v ComponentVersion) String() string

String returns the version of this component.

type ComponentVersions

type ComponentVersions map[string]ComponentVersion

ComponentVersions is a map of component names to semantic versions. Names are lowercase alphanumeric and dashes. Semantic versions will have all build labels removed, but prerelease segments are preserved.

func (ComponentVersions) DisplayNameLabel

func (v ComponentVersions) DisplayNameLabel() string

DisplayNameLabel formats the ComponentVersions into a valid display name label.

func (ComponentVersions) OrderedKeys

func (v ComponentVersions) OrderedKeys() []string

OrderedKeys returns the keys in this map in lexigraphic order.

func (ComponentVersions) String

func (v ComponentVersions) String() string

func (ComponentVersions) VersionLabel

func (v ComponentVersions) VersionLabel() string

VersionLabel formats the ComponentVersions into a valid versions label.

type CoreAzureDisk added in v0.1.17

type CoreAzureDisk struct {
	Release string `json:"release"`
	URL     string `json:"url"`
}

type CoreOSAWSImage

type CoreOSAWSImage struct {
	Release string `json:"release"`
	Image   string `json:"image"`
}

type CoreOSAWSImages

type CoreOSAWSImages struct {
	Regions map[string]CoreOSAWSImage `json:"regions"`
}

type CoreOSArchitecture

type CoreOSArchitecture struct {
	// Artifacts is a map of platform name to Artifacts
	Artifacts map[string]CoreOSArtifact `json:"artifacts"`
	Images    CoreOSImages              `json:"images"`
	RHCOS     CoreRHCOSImage            `json:"rhel-coreos-extensions"`
}

type CoreOSArtifact

type CoreOSArtifact struct {
	Release string                             `json:"release"`
	Formats map[string]map[string]CoreOSFormat `json:"formats"`
}

type CoreOSFormat

type CoreOSFormat struct {
	Location           string `json:"location"`
	Signature          string `json:"signature"`
	SHA256             string `json:"sha256"`
	UncompressedSHA256 string `json:"uncompressed-sha256"`
}

type CoreOSImages

type CoreOSImages struct {
	AWS      CoreOSAWSImages      `json:"aws"`
	PowerVS  CoreOSPowerVSImages  `json:"powervs"`
	Kubevirt CoreOSKubevirtImages `json:"kubevirt"`
}

type CoreOSKubevirtImages added in v0.1.10

type CoreOSKubevirtImages struct {
	Release   string `json:"release"`
	Image     string `json:"image"`
	DigestRef string `json:"digest-ref"`
}

type CoreOSPowerVSImage

type CoreOSPowerVSImage struct {
	Release string `json:"release"`
	Object  string `json:"object"`
	Bucket  string `json:"bucket"`
	URL     string `json:"url"`
}

type CoreOSPowerVSImages

type CoreOSPowerVSImages struct {
	Regions map[string]CoreOSPowerVSImage `json:"regions"`
}

type CoreOSStreamMetadata

type CoreOSStreamMetadata struct {
	Stream        string                        `json:"stream"`
	Architectures map[string]CoreOSArchitecture `json:"architectures"`
}

func DeserializeImageMetadata

func DeserializeImageMetadata(data []byte) (*CoreOSStreamMetadata, error)

type CoreRHCOSImage added in v0.1.17

type CoreRHCOSImage struct {
	AzureDisk CoreAzureDisk `json:"azure-disk"`
}

type Provider

type Provider interface {
	Lookup(ctx context.Context, image string, pullSecret []byte) (*ReleaseImage, error)
}

Provider knows how to find the release image metadata for an image referred to by its pullspec.

type ProviderWithOpenShiftImageRegistryOverrides added in v0.1.10

type ProviderWithOpenShiftImageRegistryOverrides interface {
	ProviderWithRegistryOverrides
	GetOpenShiftImageRegistryOverrides() map[string][]string
	GetMirroredReleaseImage() string
}

type ProviderWithOpenShiftImageRegistryOverridesDecorator added in v0.1.10

type ProviderWithOpenShiftImageRegistryOverridesDecorator struct {
	Delegate                        ProviderWithRegistryOverrides
	OpenShiftImageRegistryOverrides map[string][]string
	// contains filtered or unexported fields
}

func (*ProviderWithOpenShiftImageRegistryOverridesDecorator) GetMirroredReleaseImage added in v0.1.13

func (p *ProviderWithOpenShiftImageRegistryOverridesDecorator) GetMirroredReleaseImage() string

func (*ProviderWithOpenShiftImageRegistryOverridesDecorator) GetOpenShiftImageRegistryOverrides added in v0.1.10

func (p *ProviderWithOpenShiftImageRegistryOverridesDecorator) GetOpenShiftImageRegistryOverrides() map[string][]string

func (*ProviderWithOpenShiftImageRegistryOverridesDecorator) GetRegistryOverrides added in v0.1.10

func (*ProviderWithOpenShiftImageRegistryOverridesDecorator) Lookup added in v0.1.10

type ProviderWithRegistryOverrides

type ProviderWithRegistryOverrides interface {
	Provider
	GetRegistryOverrides() map[string]string
}

type RegistryClientProvider

type RegistryClientProvider struct {
}

RegistryClientProvider uses a registry client to directly stream image content and extract image metadata.

func (*RegistryClientProvider) Lookup

func (p *RegistryClientProvider) Lookup(ctx context.Context, image string, pullSecret []byte) (releaseImage *ReleaseImage, err error)

type RegistryMirrorProviderDecorator

type RegistryMirrorProviderDecorator struct {
	Delegate Provider
	// RegistryOverrides contains the source registry string as a key and the destination registry string as value.
	// images before being applied are scanned for the source registry string and if found the string is replaced with
	// the destination registry string. This allows hypershift to run in non-crio environments where mirroring is not
	// applicable.
	RegistryOverrides map[string]string
	// contains filtered or unexported fields
}

RegistryMirrorProviderDecorator decorates another Provider to add user-specified component name to image mappings. The Lookup implementation will first delegate to the given Delegate, and will then add additional TagReferences to the Delegate's results based on the ComponentImages.

func (*RegistryMirrorProviderDecorator) GetRegistryOverrides

func (p *RegistryMirrorProviderDecorator) GetRegistryOverrides() map[string]string

func (*RegistryMirrorProviderDecorator) Lookup

func (p *RegistryMirrorProviderDecorator) Lookup(ctx context.Context, image string, pullSecret []byte) (*ReleaseImage, error)

type ReleaseImage

type ReleaseImage struct {
	*imageapi.ImageStream `json:",inline"`
	StreamMetadata        *CoreOSStreamMetadata `json:"streamMetadata"`
}

ReleaseImage wraps an ImageStream with some utilities that help the user discover constituent component image information.

func (*ReleaseImage) ComponentImages

func (i *ReleaseImage) ComponentImages() map[string]string

func (*ReleaseImage) ComponentVersions

func (i *ReleaseImage) ComponentVersions() (map[string]string, error)

func (*ReleaseImage) Version

func (i *ReleaseImage) Version() string

type StaticProviderDecorator

type StaticProviderDecorator struct {
	Delegate        Provider
	ComponentImages map[string]string
	// contains filtered or unexported fields
}

StaticProviderDecorator decorates another Provider to add user-specified component name to image mappings. The Lookup implementation will first delegate to the given Delegate, and will then add additional TagReferences to the Delegate's results based on the ComponentImages.

func (*StaticProviderDecorator) Lookup

func (p *StaticProviderDecorator) Lookup(ctx context.Context, image string, pullSecret []byte) (*ReleaseImage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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