imagefamily

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSystemDisk = v1alpha1.SystemDisk{

	Categories: []string{"cloud", "cloud_ssd", "cloud_efficiency", "cloud_essd", "cloud_auto", "cloud_essd_entry"},
	Size:       tea.Int32(20),
}

Functions

This section is empty.

Types

type AlibabaCloudLinux3

type AlibabaCloudLinux3 struct{}

func (*AlibabaCloudLinux3) ResolveImages

func (a *AlibabaCloudLinux3) ResolveImages(images Images) Images

type ContainerOS

type ContainerOS struct{}

func (*ContainerOS) ResolveImages

func (c *ContainerOS) ResolveImages(images Images) Images

type DefaultProvider

type DefaultProvider struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewDefaultProvider

func NewDefaultProvider(region string, ecsClient *ecs.Client, ackClient *ackclient.Client,
	versionProvider version.Provider, cache *cache.Cache) *DefaultProvider

func (*DefaultProvider) GetImages

func (p *DefaultProvider) GetImages(k8sVersion string, nodeClass *v1alpha1.ECSNodeClass) (Images, error)

func (*DefaultProvider) List

func (p *DefaultProvider) List(ctx context.Context, nodeClass *v1alpha1.ECSNodeClass) (Images, error)

List Get Returning a list of Images with its associated requirements

type DefaultResolver

type DefaultResolver struct {
	sync.Mutex
	// contains filtered or unexported fields
}

DefaultResolver is able to fill-in dynamic launch template parameters

func NewDefaultResolver

func NewDefaultResolver(region string, ecsapi *ecs.Client, cache *cache.Cache) *DefaultResolver

NewDefaultResolver constructs a new launch template DefaultResolver

func (*DefaultResolver) FilterInstanceTypesBySystemDisk

func (r *DefaultResolver) FilterInstanceTypesBySystemDisk(ctx context.Context, nodeClass *v1alpha1.ECSNodeClass, instanceTypes []*cloudprovider.InstanceType) []*cloudprovider.InstanceType

TODO: check system disk stock, currently only checking compatibility

type Image

type Image struct {
	Name         string
	ImageID      string
	Requirements scheduling.Requirements
}

type ImageFamily

type ImageFamily interface {
	ResolveImages(images Images) Images
}

ImageFamily can be implemented to override the default logic for generating dynamic launch template parameters

func GetImageFamily

func GetImageFamily(family string) ImageFamily

type Images

type Images []Image

type InstanceTypeAvailableSystemDisk

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

func (*InstanceTypeAvailableSystemDisk) AddAvailableSystemDisk

func (s *InstanceTypeAvailableSystemDisk) AddAvailableSystemDisk(systemDisks ...string)

func (*InstanceTypeAvailableSystemDisk) Compatible

func (s *InstanceTypeAvailableSystemDisk) Compatible(systemDisks []string) bool

type LaunchTemplate

type LaunchTemplate struct {
	*Options
	UserData      string
	ImageID       string
	InstanceTypes []*cloudprovider.InstanceType `hash:"ignore"`
	SystemDisk    *v1alpha1.SystemDisk
	CapacityType  string
}

LaunchTemplate holds the dynamically generated launch template parameters

type Options

type Options struct {
	ClusterName     string
	ClusterEndpoint string
	// Level-triggered fields that may change out of sync.
	SecurityGroups []v1alpha1.SecurityGroup
	Tags           map[string]string
	Labels         map[string]string `hash:"ignore"`
	NodeClassName  string
}

Options define the static launch template parameters

type Provider

type Provider interface {
	List(ctx context.Context, nodeClass *v1alpha1.ECSNodeClass) (Images, error)
}

type Resolver

type Resolver interface {
	FilterInstanceTypesBySystemDisk(context.Context, *v1alpha1.ECSNodeClass, []*cloudprovider.InstanceType) []*cloudprovider.InstanceType
}

Jump to

Keyboard shortcuts

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