image

package
v1.104.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Minio      = "minio/minio:RELEASE.2023-10-25T06-33-25Z"
	Mc         = "minio/mc:RELEASE.2023-10-14T01-57-03Z"
	Rqlite     = "rqlite/rqlite:7.21.4"
	Dex        = "ghcr.io/dexidp/dex:v2.37.0"
	Schemahero = "schemahero/schemahero:0.16.0"
	Lvp        = "replicated/local-volume-provider:v0.5.5"
)

Variables

This section is empty.

Functions

func BuildImageAltNames

func BuildImageAltNames(rewrittenImage kustomizetypes.Image) ([]kustomizetypes.Image, error)

func CopyImage added in v1.82.0

func CopyImage(opts types.CopyImageOptions) error

func CopyImageWithGC

func CopyImageWithGC(ctx context.Context, destRef, srcRef containerstypes.ImageReference, options *copy.Options) ([]byte, error)

func DestImage added in v1.82.0

func DestImage(destRegistry registrytypes.RegistryOptions, srcImage string) (string, error)

DestImage returns the location to push the image to on the dest registry

func DestImageFromKustomizeImage added in v1.82.0

func DestImageFromKustomizeImage(image kustomizetypes.Image) string

DestImageFromKustomizeImage returns the location to push the image to from a kustomize image type

func GetMinioImage

func GetMinioImage(clientset kubernetes.Interface, kotsadmNamespace string) (string, error)

MinioImage looks through the nodes in the cluster and finds nodes that have already pulled Minio, and then finds the latest image tag listed

func GetPrivateImages

func GetPrivateImages(baseDir string, kotsKindsImages []string, checkedImages map[string]types.ImageInfo, allPrivate bool, dockerHubRegistry dockerregistrytypes.RegistryOptions, parentHelmChartPath string, useHelmInstall map[string]bool) ([]string, []k8sdoc.K8sDoc, error)

func GetTag

func GetTag(imageRef string) (string, error)

GetTag extracts the image tag from an image reference

func IsPrivateImage

func IsPrivateImage(image string, dockerHubRegistry dockerregistrytypes.RegistryOptions) (bool, error)

if dockerHubRegistry is provided, its credentials will be used for DockerHub images to increase the rate limit.

func RewriteDockerArchiveImage added in v1.82.0

func RewriteDockerArchiveImage(registry registrytypes.RegistryOptions, nameParts []string) (kustomizetypes.Image, error)

func RewriteDockerRegistryImage added in v1.82.0

func RewriteDockerRegistryImage(destRegistry registrytypes.RegistryOptions, srcImage string) (*kustomizetypes.Image, error)

func RewriteImages added in v1.82.0

func RewriteImages(srcRegistry, destRegistry dockerregistrytypes.RegistryOptions, appSlug string, log *logger.CLILogger, reportWriter io.Writer, upstreamDir string, additionalImages []string, copyImages, allImagesPrivate bool, checkedImages map[string]types.ImageInfo, dockerHubRegistry dockerregistrytypes.RegistryOptions) ([]kustomizeimage.Image, error)

func RewritePrivateImage

func RewritePrivateImage(srcRegistry dockerregistrytypes.RegistryOptions, image string, appSlug string) (string, error)

func SrcImageFromKustomizeImage added in v1.85.0

func SrcImageFromKustomizeImage(image kustomizetypes.Image) string

SrcImageFromKustomizeImage returns the location of the source image from a kustomize image type Note: if image name contains both a tag and a digest, only the digest is used, so the result might not exactly match the original image name.

Types

type ProcessImageOptions added in v1.99.0

type ProcessImageOptions struct {
	AppSlug          string
	Namespace        string
	RewriteImages    bool
	RegistrySettings regsitrytypes.RegistrySettings
	CopyImages       bool
	RootDir          string
	IsAirgap         bool
	AirgapRoot       string
	AirgapBundle     string
	PushImages       bool
	CreateAppDir     bool
	ReportWriter     io.Writer
}

type RewriteImagesBetweenRegistriesOptions added in v1.99.0

type RewriteImagesBetweenRegistriesOptions struct {
	BaseDir           string
	AppSlug           string
	SourceRegistry    dockerregistrytypes.RegistryOptions
	DestRegistry      dockerregistrytypes.RegistryOptions
	DockerHubRegistry dockerregistrytypes.RegistryOptions
	CopyImages        bool
	IsAirgap          bool
	Log               *logger.CLILogger
	ReportWriter      io.Writer
	KotsKinds         *kotsutil.KotsKinds
}

type RewriteImagesResult added in v1.99.0

type RewriteImagesResult struct {
	Images        []kustomizeimage.Image          // images to be rewritten
	CheckedImages []kotsv1beta1.InstallationImage // all images found in the installation
}

func RewriteBaseImages added in v1.99.0

func RewriteBaseImages(options ProcessImageOptions, baseDir string, kotsKinds *kotsutil.KotsKinds, license *kotsv1beta1.License, dockerHubRegistryCreds registry.Credentials, log *logger.CLILogger) (*RewriteImagesResult, error)

RewriteBaseImages Will rewrite images found in base and copy them (if necessary) to the configured registry.

func RewriteImagesBetweenRegistries added in v1.99.0

func RewriteImagesBetweenRegistries(options RewriteImagesBetweenRegistriesOptions) (*RewriteImagesResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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