image

package
v1.108.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EmbeddedClusterArtifactType = "application/vnd.embeddedcluster.artifact"
	EmbeddedClusterMediaType    = "application/vnd.embeddedcluster.file"
)
View Source
const (
	Minio      = "kotsadm/minio:0.20240418.190919-r0"
	Rqlite     = "kotsadm/rqlite:8.23.3-r0"
	Dex        = "kotsadm/dex:2.39.1-r0"
	Schemahero = "schemahero/schemahero:0.17.6"
	Lvp        = "replicated/local-volume-provider:v0.6.2"
)

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 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 PushEmbeddedClusterArtifacts added in v1.108.2

func PushEmbeddedClusterArtifacts(airgapBundle string, artifactsToPush *kotsv1beta1.EmbeddedClusterArtifacts, opts imagetypes.PushEmbeddedClusterArtifactsOptions) error

func PushImagesFromDockerArchiveBundle added in v1.107.0

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

func PushImagesFromDockerArchivePath added in v1.107.0

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

func PushImagesFromTempRegistry added in v1.107.0

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

func RewritePrivateImage

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

func TagAndPushImagesFromBundle added in v1.107.0

func TagAndPushImagesFromBundle(airgapBundle 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 UpdateInstallationEmbeddedClusterArtifactsOptions added in v1.108.5

type UpdateInstallationEmbeddedClusterArtifactsOptions struct {
	Artifacts   []string
	KotsKinds   *kotsutil.KotsKinds
	UpstreamDir string
}

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