Help us shape the future of Go! Take the 2026 Go Developer Survey

layouts

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyLayout = errors.New("No images in layout")

Functions

func CreateEmptyImageLayoutAtPath

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

func FillLayoutsWithBasicDeckhouseImages

func FillLayoutsWithBasicDeckhouseImages(
	mirrorCtx *contexts.PullContext,
	layouts *ImageLayouts,
	deckhouseVersions []semver.Version,
)

func FindDeckhouseModulesImages

func FindDeckhouseModulesImages(mirrorCtx *contexts.PullContext, 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(mirrorCtx *contexts.PullContext, layouts *ImageLayouts) error

func PullDeckhouseReleaseChannels

func PullDeckhouseReleaseChannels(mirrorCtx *contexts.PullContext, layouts *ImageLayouts) error

func PullImageSet

func PullImageSet(
	pullCtx *contexts.PullContext,
	targetLayout layout.Path,
	imageSet map[string]struct{},
	opts ...func(opts *pullImageSetOptions),
) error

func PullInstallers

func PullInstallers(mirrorCtx *contexts.PullContext, layouts *ImageLayouts) error

func PullModules

func PullModules(mirrorCtx *contexts.PullContext, layouts *ImageLayouts) error

func PullStandaloneInstallers added in v0.3.4

func PullStandaloneInstallers(mirrorCtx *contexts.PullContext, layouts *ImageLayouts) error

func PullTrivyVulnerabilityDatabasesImages

func PullTrivyVulnerabilityDatabasesImages(
	pullCtx *contexts.PullContext,
	layouts *ImageLayouts,
) error

func PushLayoutToRepo

func PushLayoutToRepo(
	imagesLayout layout.Path,
	registryRepo string,
	authProvider authn.Authenticator,
	logger contexts.Logger,
	parallelismConfig contexts.ParallelismConfig,
	insecure, skipVerifyTLS bool,
) 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)

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 *contexts.BaseContext, 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