instance

package
v0.0.0-...-7be06aa Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SkipCache = func(opts *options) {
	opts.SkipCache = true
}

Functions

This section is empty.

Types

type DefaultProvider

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

func NewDefaultProvider

func NewDefaultProvider(
	region string,
	recorder events.Recorder,
	client sdk.LinodeAPI,
	unavailableOfferings *linodecache.UnavailableOfferings,
	instanceCache *cache.Cache,
) *DefaultProvider

func (*DefaultProvider) Create

func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.LinodeNodeClass, nodeClaim *karpv1.NodeClaim, tags map[string]string, instanceTypes []*cloudprovider.InstanceType) (*Instance, error)

func (*DefaultProvider) CreateTags

func (p *DefaultProvider) CreateTags(ctx context.Context, id string, tags map[string]string) error

NOTE: Linode's API only supports creating tags one at a time. This might be a problem if we want to add multiple tags at once.

func (*DefaultProvider) Delete

func (p *DefaultProvider) Delete(ctx context.Context, id string) error

func (*DefaultProvider) Get

func (p *DefaultProvider) Get(ctx context.Context, id string, opts ...Options) (*Instance, error)

func (*DefaultProvider) List

func (p *DefaultProvider) List(ctx context.Context) ([]*Instance, error)

type Instance

type Instance struct {
	ID                  int
	Created             *time.Time
	Region              string
	Image               string
	Group               string
	Label               string
	Type                string
	Status              linodego.InstanceStatus
	WatchdogEnabled     bool
	Tags                []string
	Labels              map[string]string
	Taints              []linodego.LKENodePoolTaint
	PoolID              int
	NodeID              string
	LKEStatus           linodego.LKELinodeStatus
	PlacementGroup      *linodego.InstancePlacementGroup
	DiskEncryption      linodego.InstanceDiskEncryption
	InterfaceGeneration linodego.InterfaceGeneration
}

Instance is an internal data representation of a linode.Instance It contains all the common data that is needed to inject into the Machine from this responses

func NewInstance

func NewInstance(_ context.Context, instance linodego.Instance) *Instance

func NewLKEInstance

func NewLKEInstance(pool *linodego.LKENodePool, node linodego.LKENodePoolLinode, region string) *Instance

NewLKEInstance returns an Instance representing an LKE node pool linode.

type Options

type Options = option.Function[options]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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