layouts

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEmptyImageLayout added in v0.10.0

func CreateEmptyImageLayout(path string) (layout.Path, error)

func FillLayoutsWithBasicDeckhouseImages

func FillLayoutsWithBasicDeckhouseImages(
	pullParams *params.PullParams,
	layouts *ImageLayouts,
	deckhouseVersions []string,
)

func FindDeckhouseModulesImages

func FindDeckhouseModulesImages(params *params.PullParams, layouts *ImageLayouts) error

func FindImageByTag

func FindImageByTag(l layout.Path, tag string) (v1.Image, error)

func NopTagToDigestMappingFunc

func NopTagToDigestMappingFunc(_ string) *v1.Hash

TODO no-op must be the default, this should not exist

func PullDeckhouseImages

func PullDeckhouseImages(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullDeckhouseReleaseChannels

func PullDeckhouseReleaseChannels(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullImageSet

func PullImageSet(
	pullParams *params.PullParams,
	targetLayout layout.Path,
	imageSet map[string]struct{},
	opts ...func(opts *pullImageSetOptions),
) error

func PullInstallers

func PullInstallers(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullModules

func PullModules(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullStandaloneInstallers added in v0.3.4

func PullStandaloneInstallers(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullTrivyVulnerabilityDatabasesImages

func PullTrivyVulnerabilityDatabasesImages(
	pullParams *params.PullParams,
	layouts *ImageLayouts,
) error

func PushLayoutToRepo

func PushLayoutToRepo(
	imagesLayout layout.Path,
	registryRepo string,
	authProvider authn.Authenticator,
	logger params.Logger,
	parallelismConfig params.ParallelismConfig,
	insecure, skipVerifyTLS bool,
) error

func PushLayoutToRepoContext added in v0.6.0

func PushLayoutToRepoContext(
	ctx context.Context,
	imagesLayout layout.Path,
	registryRepo string,
	authProvider authn.Authenticator,
	logger params.Logger,
	parallelismConfig params.ParallelismConfig,
	insecure, skipVerifyTLS bool,
) error

func SortIndexManifests added in v0.9.2

func SortIndexManifests(l layout.Path) error

func WithAllowMissingTags

func WithAllowMissingTags(allow bool) func(opts *pullImageSetOptions)

func WithTagToDigestMapper

func WithTagToDigestMapper(fn TagToDigestMappingFunc) func(opts *pullImageSetOptions)

Types

type ImageLayouts

type ImageLayouts struct {
	Deckhouse       layout.Path
	DeckhouseImages map[string]struct{}

	Install       layout.Path
	InstallImages map[string]struct{}

	InstallStandalone       layout.Path
	InstallStandaloneImages map[string]struct{}

	ReleaseChannel       layout.Path
	ReleaseChannelImages map[string]struct{}

	TrivyDB           layout.Path
	TrivyDBImages     map[string]struct{}
	TrivyBDU          layout.Path
	TrivyBDUImages    map[string]struct{}
	TrivyJavaDB       layout.Path
	TrivyJavaDBImages map[string]struct{}
	TrivyChecks       layout.Path
	TrivyChecksImages map[string]struct{}

	Modules map[string]ModuleImageLayout

	TagsResolver *TagsResolver
}

func CreateOCIImageLayoutsForDeckhouse

func CreateOCIImageLayoutsForDeckhouse(
	rootFolder string,
	modules []modules.Module,
) (*ImageLayouts, error)

func NewImageLayouts added in v0.10.0

func NewImageLayouts() *ImageLayouts

func (*ImageLayouts) Layouts added in v0.10.0

func (l *ImageLayouts) Layouts() []layout.Path

Layouts returns a list of layout.Path's in it. Undefined path's are not included in the list.

type ModuleImageLayout

type ModuleImageLayout struct {
	ModuleLayout layout.Path
	ModuleImages map[string]struct{}

	ReleasesLayout layout.Path
	ReleaseImages  map[string]struct{}
}

type TagToDigestMappingFunc

type TagToDigestMappingFunc func(imageRef string) *v1.Hash

type TagsResolver

type TagsResolver struct {
	// contains filtered or unexported fields
}

func NewTagsResolver

func NewTagsResolver() *TagsResolver

func (*TagsResolver) GetTagDigest

func (r *TagsResolver) GetTagDigest(imageRef string) *v1.Hash

func (*TagsResolver) ResolveTagsDigestsForImageLayouts

func (r *TagsResolver) ResolveTagsDigestsForImageLayouts(mirrorCtx *params.BaseParams, layouts *ImageLayouts) error

func (*TagsResolver) ResolveTagsDigestsFromImageSet

func (r *TagsResolver) ResolveTagsDigestsFromImageSet(
	imageSet map[string]struct{},
	authProvider authn.Authenticator,
	insecure, skipTLSVerification bool,
) error

Jump to

Keyboard shortcuts

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