instance

package
v1.7.3-hash-fix-backport Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func SpotServiceLinkedRoleCreationFailure added in v1.5.0

func SpotServiceLinkedRoleCreationFailure(nodeClaim *v1.NodeClaim) events.Event

Types

type CreateFleetInputBuilder added in v1.6.0

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

func NewCreateFleetInputBuilder added in v1.6.0

func NewCreateFleetInputBuilder(capacityType string, tags map[string]string, launchTemplateConfigs []ec2types.FleetLaunchTemplateConfigRequest) *CreateFleetInputBuilder

func (*CreateFleetInputBuilder) Build added in v1.6.0

func (*CreateFleetInputBuilder) WithCapacityReservationType added in v1.6.0

func (b *CreateFleetInputBuilder) WithCapacityReservationType(crt v1.CapacityReservationType) *CreateFleetInputBuilder

func (*CreateFleetInputBuilder) WithContextID added in v1.6.0

func (b *CreateFleetInputBuilder) WithContextID(contextID string) *CreateFleetInputBuilder

func (*CreateFleetInputBuilder) WithOverlay added in v1.7.0

type DefaultProvider added in v0.36.0

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

func NewDefaultProvider added in v0.36.0

func NewDefaultProvider(
	ctx context.Context,
	region string,
	recorder events.Recorder,
	ec2api sdk.EC2API,
	unavailableOfferings *awscache.UnavailableOfferings,
	subnetProvider subnet.Provider,
	launchTemplateProvider launchtemplate.Provider,
	capacityReservationProvider capacityreservation.Provider,
	instanceCache *cache.Cache,
) *DefaultProvider

func (*DefaultProvider) Create added in v0.36.0

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

func (*DefaultProvider) CreateTags added in v0.36.0

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

func (*DefaultProvider) Delete added in v0.36.0

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

func (*DefaultProvider) Get added in v0.36.0

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

func (*DefaultProvider) List added in v0.36.0

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

type Instance

type Instance struct {
	LaunchTime              time.Time
	State                   ec2types.InstanceStateName
	ID                      string
	ImageID                 string
	Type                    ec2types.InstanceType
	Zone                    string
	CapacityType            string
	SecurityGroupIDs        []string
	SubnetID                string
	Tags                    map[string]string
	EFAEnabled              bool
	CapacityReservationID   *string
	CapacityReservationType *v1.CapacityReservationType
}

Instance is an internal data representation of either an ec2.Instance or an ec2.FleetInstance It contains all the common data that is needed to inject into the Machine from either of these responses

func NewInstance

func NewInstance(ctx context.Context, instance ec2types.Instance) *Instance

func NewInstanceFromFleet

func NewInstanceFromFleet(
	out ec2types.CreateFleetInstance,
	capacityType string,
	tags map[string]string,
	opts ...NewInstanceFromFleetOpts,
) *Instance

type NewInstanceFromFleetOpts added in v1.6.0

type NewInstanceFromFleetOpts = option.Function[Instance]

func WithCapacityReservationDetails added in v1.6.0

func WithCapacityReservationDetails(id string, crt v1.CapacityReservationType) NewInstanceFromFleetOpts

func WithEFAEnabled added in v1.6.0

func WithEFAEnabled() NewInstanceFromFleetOpts

type Options added in v1.7.0

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