image

package
v1.106.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Minio      = "kotsadm/minio:0.20231101.183725-r1"
	Rqlite     = "kotsadm/rqlite:8.17.0-r0"
	Dex        = "kotsadm/dex:2.37.0-r12"
	Schemahero = "schemahero/schemahero:0.17.2"
	Lvp        = "replicated/local-volume-provider:v0.5.6"
)

Variables

This section is empty.

Functions

func CopyAirgapImages added in v1.106.0

func CopyAirgapImages(opts imagetypes.ProcessImageOptions, log *logger.CLILogger) error

CopyAirgapImages pushes images found in the app airgap bundle/airgap root to the configured registry.

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 CopyOnlineImages added in v1.106.0

func CopyOnlineImages(opts imagetypes.ProcessImageOptions, images []string, kotsKinds *kotsutil.KotsKinds, license *kotsv1beta1.License, dockerHubRegistryCreds registry.Credentials, log *logger.CLILogger) error

func ExtractAppAirgapArchive added in v1.106.0

func ExtractAppAirgapArchive(archive string, destDir string, excludeImages bool, progressWriter io.Writer) error

func FindImagesInDir added in v1.106.0

func FindImagesInDir(dir string) ([]string, error)

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 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 PushAppImagesFromDockerArchiveBundle added in v1.106.0

func PushAppImagesFromDockerArchiveBundle(airgapBundle string, options imagetypes.PushImagesOptions) error

func PushAppImagesFromDockerArchivePath added in v1.106.0

func PushAppImagesFromDockerArchivePath(airgapRootDir string, options imagetypes.PushImagesOptions) error

func PushAppImagesFromTempRegistry added in v1.106.0

func PushAppImagesFromTempRegistry(airgapRootDir string, imageList []string, options imagetypes.PushImagesOptions) error

func PushImages added in v1.106.0

func PushImages(airgapArchive string, options imagetypes.PushImagesOptions) error

PushImages detects if airgap bundle is a KOTS or app bundle, then pushes images from airgap bundle to private registry accordingly

func RewritePrivateImage

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

func TagAndPushAppImagesFromBundle added in v1.106.0

func TagAndPushAppImagesFromBundle(airgapBundle string, options imagetypes.PushImagesOptions) error

func TagAndPushAppImagesFromPath added in v1.106.0

func TagAndPushAppImagesFromPath(airgapRootDir string, options imagetypes.PushImagesOptions) error

func UpdateInstallationImages added in v1.106.0

func UpdateInstallationImages(opts UpdateInstallationImagesOptions) error

func WriteProgressLine added in v1.106.0

func WriteProgressLine(progressWriter io.Writer, line string)

Types

type ProgressImage added in v1.106.0

type ProgressImage struct {
	// image name and tag, "nginx:latest"
	DisplayName string `json:"displayName"`
	// image upload status: queued, uploading, uploaded, failed
	Status string `json:"status"`
	// error string set when status is failed
	Error string `json:"error"`
	// amount currently uploaded (currently number of layers)
	Current int64 `json:"current"`
	// total amount that needs to be uploaded (currently number of layers)
	Total int64 `json:"total"`
	// time when image started uploading
	StartTime time.Time `json:"startTime"`
	// time when image finished uploading
	EndTime time.Time `json:"endTime"`
}

type ProgressReport added in v1.106.0

type ProgressReport struct {
	// set to "progressReport"
	Type string `json:"type"`
	// the same progress text that used to be sent in unstructured message
	CompatibilityMessage string `json:"compatibilityMessage"`
	// all images found in archive
	Images []ProgressImage `json:"images"`
}

type UpdateInstallationImagesOptions added in v1.106.0

type UpdateInstallationImagesOptions struct {
	Images                 []string
	KotsKinds              *kotsutil.KotsKinds
	IsAirgap               bool
	UpstreamDir            string
	DockerHubRegistryCreds registry.Credentials
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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