imageprovider

package
v0.1.89 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReleaseImageProvider

type ReleaseImageProvider interface {
	GetImage(key string) string
	ImageExist(key string) (string, bool)
	Version() string
	ComponentVersions() (map[string]string, error)
	ComponentImages() map[string]string
}

ReleaseImageProvider provides the functionality to retrieve OpenShift components' container image from a release image.

type SimpleReleaseImageProvider

type SimpleReleaseImageProvider struct {
	*releaseinfo.ReleaseImage
	// contains filtered or unexported fields
}

SimpleReleaseImageProvider is a simple implementation of ReleaseImageProvider.

func New

New creates a new SimpleReleaseImageProvider from a ReleaseImage.

func NewFromImages

func NewFromImages(componentsImages map[string]string) *SimpleReleaseImageProvider

NewFromImages creates a SimpleReleaseImageProvider from a map of component images.

func NewWithRegistryOverrides

func NewWithRegistryOverrides(releaseImage *releaseinfo.ReleaseImage, registryOverrides map[string]string) *SimpleReleaseImageProvider

NewWithRegistryOverrides creates a SimpleReleaseImageProvider that applies registry overrides to all component images. This ensures init containers and other sub-resources created by CPO use the overridden image references.

The returned provider owns a private copy of releaseImage.ComponentImages() so callers can safely mutate it.

func (*SimpleReleaseImageProvider) ComponentImages

func (p *SimpleReleaseImageProvider) ComponentImages() map[string]string

ComponentImages returns all component images.

func (*SimpleReleaseImageProvider) GetImage

func (p *SimpleReleaseImageProvider) GetImage(key string) string

GetImage returns the image for the given key, recording missing images.

func (*SimpleReleaseImageProvider) GetMissingImages

func (p *SimpleReleaseImageProvider) GetMissingImages() []string

GetMissingImages returns the list of images that were requested but not found.

func (*SimpleReleaseImageProvider) ImageExist

func (p *SimpleReleaseImageProvider) ImageExist(key string) (string, bool)

ImageExist checks if an image exists for the given key.

Jump to

Keyboard shortcuts

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