Documentation
¶
Index ¶
- Variables
- type DefaultProvider
- func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.LinodeNodeClass, ...) (*Instance, error)
- func (p *DefaultProvider) CreateTags(ctx context.Context, id string, tags map[string]string) error
- func (p *DefaultProvider) Delete(ctx context.Context, id string) error
- func (p *DefaultProvider) Get(ctx context.Context, id string, opts ...Options) (*Instance, error)
- func (p *DefaultProvider) List(ctx context.Context) ([]*Instance, error)
- type Instance
- type Options
- type Provider
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 ¶
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
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 NewLKEInstance ¶
func NewLKEInstance(pool *linodego.LKENodePool, node linodego.LKENodePoolLinode, region string) *Instance
NewLKEInstance returns an Instance representing an LKE node pool linode.
type Provider ¶
type Provider interface {
Create(context.Context, *v1.LinodeNodeClass, *karpv1.NodeClaim, map[string]string, []*cloudprovider.InstanceType) (*Instance, error)
Get(context.Context, string, ...Options) (*Instance, error)
List(context.Context) ([]*Instance, error)
Delete(context.Context, string) error
CreateTags(context.Context, string, map[string]string) error
}
Click to show internal directories.
Click to hide internal directories.