pkeaws

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ImageNotFoundError = errors.Sentinel("no images found matching the selection criteria")

ImageNotFoundError is returned by an ImageSelector when it cannot find an image matching the provided criteria.

View Source
const Version = "0.9.3"

Version is the currently supported PKE version.

Variables

This section is empty.

Functions

func GenerateNodePoolStackName

func GenerateNodePoolStackName(clusterName string, poolName string) string

TODO: this is temporary

Types

type ErrorHandler

type ErrorHandler = common.ErrorHandler

ErrorHandler handles an error.

type ImageSelectionCriteria

type ImageSelectionCriteria struct {
	Region            string
	InstanceType      string
	PKEVersion        string
	KubernetesVersion string
	OperatingSystem   string
	ContainerRuntime  string
}

ImageSelectionCriteria contains all parameters for selecting an image.

type ImageSelector

type ImageSelector interface {
	SelectImage(ctx context.Context, criteria ImageSelectionCriteria) (string, error)
}

ImageSelector chooses an image based on the selection criteria. It returns an ImageNotFoundError when no images can be found matching the provided criteria.

func DefaultImages

func DefaultImages() ImageSelector

DefaultImages returns an image selector that returns fallback images if no other images are found. These are plain images, so PKE will be installed during the node bootstrapping.

func GPUImages

func GPUImages() ImageSelector

GPUImages returns an image selector that returns GPU accelerated images. These are plain images, so PKE will be installed during the node bootstrapping.

func NewGPUImageSelector

func NewGPUImageSelector(imageSelector ImageSelector) ImageSelector

NewGPUImageSelector returns a new GPU image selector.

type ImageSelectorChain

type ImageSelectorChain struct {
	// contains filtered or unexported fields
}

ImageSelectorChain tries to select an image using a number of selectors. When one fails, it moves onto the next in the chain.

func NewImageSelectorChain

func NewImageSelectorChain(logger Logger, errorHandler ErrorHandler) *ImageSelectorChain

NewImageSelectorChain returns a new ImageSelectorChain.

func (*ImageSelectorChain) AddSelector

func (s *ImageSelectorChain) AddSelector(name string, selector ImageSelector)

AddSelector registers a new ImageSelector in the chain.

func (*ImageSelectorChain) SelectImage

func (s *ImageSelectorChain) SelectImage(ctx context.Context, criteria ImageSelectionCriteria) (string, error)

type Logger

type Logger = common.Logger

Logger is the fundamental interface for all log operations.

type NoopErrorHandler

type NoopErrorHandler = common.NoopErrorHandler

NoopErrorHandler is an error handler that discards every error.

type NoopLogger

type NoopLogger = common.NoopLogger

NoopLogger is a logger that discards every log event.

type RegionMapImageSelector

type RegionMapImageSelector map[string]string

RegionMapImageSelector selects an image based on the region in the selection criteria.

func (RegionMapImageSelector) SelectImage

Directories

Path Synopsis
pkeawsprovider

Jump to

Keyboard shortcuts

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