installer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package installer contains the implementation of Kubernetes components installation and uninstallation for a given OS and Kubernetes version. All the components are packaged as an ImgPkg bundle hosted on OCI registries.

Index

Constants

View Source
const (
	ErrDetectOs          = Error("Error detecting OS")
	ErrOsK8sNotSupported = Error("No k8s support for OS")
	ErrBundleDownload    = Error("Error downloading bundle")
	ErrBundleExtract     = Error("Error extracting bundle")
	ErrBundleInstall     = Error("Error installing bundle")
	ErrBundleUninstall   = Error("Error uninstalling bundle")
)

Variables

View Source
var (
	DownloadPathPermissions fs.FileMode = 0777
)

Functions

func GetBundleName

func GetBundleName(normalizedOsVersion, k8sVersion string) string

GetBundleName returns the name of the bundle in normalized format.

func ListSupportedK8s

func ListSupportedK8s(os string) []string

ListSupportedK8s returns the list of supported k8s for a specific OS. Can be invoked on a non-supported OS

func ListSupportedOS

func ListSupportedOS() (osFilters, osBundles []string)

ListSupportedOS returns the list of all supported OS-es. Can be invoked on a non-supported OS.

func Main

func Main()

func New

func New(downloadPath string, logger logr.Logger) (*installer, error)

New returns an installer that downloads bundles for the current OS from OCI repository with address bundleRepo and stores them under downloadPath. Download path is created, if it does not exist.

func PreviewChanges

func PreviewChanges(os, k8sVer string) (install, uninstall string, err error)

PreviewChanges describes the changes to install and uninstall K8s on OS without actually applying them. It returns install and uninstall changes Can be invoked on a non-supported OS

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

Directories

Path Synopsis
internal
algo
Package algo contains the interal implementation of the actual steps required for installation and uninstallation of Kubernetes components.
Package algo contains the interal implementation of the actual steps required for installation and uninstallation of Kubernetes components.

Jump to

Keyboard shortcuts

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