download

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 39 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// PreloadVersion is the current version of the preloaded tarball
	//
	// NOTE: You may need to bump this version up when upgrading auxiliary docker images
	PreloadVersion = "v18"
	// PreloadBucket is the name of the GCS bucket where preloaded volume tarballs exist
	PreloadBucket = "minikube-preloaded-volume-tarballs"
)

Variables

View Source
var DefaultJSONOutput getter.ProgressTracker = &jsonOutput{}

DefaultJSONOutput is a progress tracker with JSON output

View Source
var DefaultProgressBar getter.ProgressTracker = &progressBar{}

DefaultProgressBar is the default cheggaaa progress bar

View Source
var (
	// DownloadMock is called instead of the download implementation if not nil.
	DownloadMock func(src, dst string) error
)

Functions

func Binary

func Binary(binary, version, osName, archName, binaryURL string) (string, error)

Binary will download a binary onto the host

func CacheToDaemon added in v1.21.0

func CacheToDaemon(img string) (string, error)

CacheToDaemon loads image from tarball in the local cache directory to the local docker daemon It returns the img that was loaded into the daemon If online it will be: image:tag@sha256 If offline it will be: image:tag

func CleanUpOlderPreloads added in v1.24.0

func CleanUpOlderPreloads()

CleanUpOlderPreloads deletes preload files belonging to older minikube versions checks the current preload version and then if the saved tar file is belongs to older minikube it will delete it in case of failure only logs to the user

func CreateDstDownloadMock added in v1.21.0

func CreateDstDownloadMock(_, dst string) error

CreateDstDownloadMock is the default mock implementation of download.

func DefaultISOURLs

func DefaultISOURLs() []string

DefaultISOURLs returns a list of ISO URL's to consult by default, in priority order

func DefaultKubeBinariesURL added in v1.25.0

func DefaultKubeBinariesURL() string

DefaultKubeBinariesURL returns a URL to kube binaries

func Driver

func Driver(name string, destination string, v semver.Version) error

Driver downloads an arbitrary driver

func ISO

func ISO(urls []string, skipChecksum bool) (string, error)

ISO downloads and returns the path to the downloaded ISO

func ImageExistsInCache added in v1.21.0

func ImageExistsInCache(img string) bool

ImageExistsInCache if img exist in local cache directory

func ImageExistsInDaemon added in v1.21.0

func ImageExistsInDaemon(img string) bool

ImageExistsInDaemon if img exist in local docker daemon

func ImageToCache added in v1.21.0

func ImageToCache(img string) error

ImageToCache downloads img (if not present in cache) and writes it to the local cache directory

func Licenses added in v1.28.0

func Licenses(dir string) error

func LocalISOResource

func LocalISOResource(isoURL string) string

LocalISOResource returns a local file:// URI equivalent for a local or remote ISO path

func Preload

func Preload(k8sVersion, containerRuntime, driverName string) error

Preload caches the preloaded images tarball on the host machine

func PreloadChecksumPath

func PreloadChecksumPath(k8sVersion, containerRuntime string) string

PreloadChecksumPath returns the local path to the cached checksum file

func PreloadExists

func PreloadExists(k8sVersion, containerRuntime, driverName string, forcePreload ...bool) bool

PreloadExists returns true if there is a preloaded tarball that can be used

func SetAliyunMirror added in v1.24.0

func SetAliyunMirror()

SetAliyunMirror set the download host for Aliyun mirror

func TarballName added in v1.9.0

func TarballName(k8sVersion, containerRuntime string) string

TarballName returns name of the tarball

func TarballPath

func TarballPath(k8sVersion, containerRuntime string) string

TarballPath returns the local path to the cached preload tarball

Types

This section is empty.

Jump to

Keyboard shortcuts

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