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") )
View Source
const ( Ubuntu20_04LinuxDistro = "Ubuntu_20.04.1_x86-64" Ubuntu22_04LinuxDistro = "Ubuntu_22.04_x86-64" )
Variables ¶
View Source
var ( // DownloadPathPermissions file mode permissions for download path DownloadPathPermissions fs.FileMode = 0777 )
Functions ¶
func GetBundleName ¶
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 K8sInstaller ¶
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
Click to show internal directories.
Click to hide internal directories.