installer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrDetectOs error type when supported OS could not be detected
	ErrDetectOs = Error("Error detecting OS")
	// ErrOsK8sNotSupported error type when the OS is not supported by the k8s installer
	ErrOsK8sNotSupported = Error("No k8s support for OS")
	// ErrBundleDownload error type when the bundle download fails
	ErrBundleDownload = Error("Error downloading bundle")
	// ErrBundleExtract error type when the bundle extraction fails
	ErrBundleExtract = Error("Error extracting bundle")
	// ErrBundleInstall error type when the bundle installation fails
	ErrBundleInstall = Error("Error installing bundle")
	// ErrBundleUninstall error type when the bundle uninstallation fails
	ErrBundleUninstall = Error("Error uninstalling bundle")
)

Variables

View Source
var (
	// DownloadPathPermissions file mode permissions for download path
	DownloadPathPermissions fs.FileMode = 0777
)

Functions

func GetBundleName

func GetBundleName(normalizedOsVersion string) string

GetBundleName returns the name of the bundle in normalized format.

func GetSupportedRegistry

func GetSupportedRegistry() registry

GetSupportedRegistry returns a registry with installers for the supported OS and K8s

func NewBundleDownloader

func NewBundleDownloader(bundleType, repoAddr, downloadPath string, logger logr.Logger) *bundleDownloader

NewBundleDownloader will return a new bundle downloader instance

Types

type BundleType

type BundleType string

BundleType is used to support various bundles

const (
	// BundleTypeK8s represents a vanilla k8s bundle
	BundleTypeK8s BundleType = "k8s"
)

type Error

type Error string

Error string wrapper for errors returned by the installer

func (Error) Error

func (e Error) Error() string

type K8sInstaller

type K8sInstaller interface {
	Install() string
	Uninstall() string
}

K8sInstaller represent k8s installer interface

func NewInstaller

func NewInstaller(ctx context.Context, osDist, arch, k8sVersion string, downloader *bundleDownloader) (K8sInstaller, error)

NewInstaller will return a new installer

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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