Documentation
¶
Index ¶
- Variables
- func SpotServiceLinkedRoleCreationFailure(nodeClaim *v1.NodeClaim) events.Event
- type CapacityReservationDetails
- type CreateFleetInputBuilder
- func (b *CreateFleetInputBuilder) Build() *ec2.CreateFleetInput
- func (b *CreateFleetInputBuilder) WithCapacityReservationType(crt v1.CapacityReservationType, interruptible bool) *CreateFleetInputBuilder
- func (b *CreateFleetInputBuilder) WithContextID(contextID string) *CreateFleetInputBuilder
- func (b *CreateFleetInputBuilder) WithOverlay() *CreateFleetInputBuilder
- type DefaultProvider
- func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.EC2NodeClass, nodeClaim *karpv1.NodeClaim, ...) (*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 NewInstanceFromFleetOpts
- type Options
- type Provider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Counts per-offering CreateFleet errors, not per-NodeClaim attempts: one CreateFleet // call can fail multiple offerings across different zones and instance types. InstanceLaunchFailuresTotal = opmetrics.NewPrometheusCounter( crmetrics.Registry, prometheus.CounterOpts{ Namespace: metrics.Namespace, Subsystem: cloudProviderSubsystem, Name: "instance_launch_failures_total", Help: "Number of instance launch (CreateFleet offering) failures, dimensioned by availability zone, zone ID, capacity type, and launch failure reason.", }, []string{ zoneLabel, zoneIDLabel, metrics.CapacityTypeLabel, metrics.ReasonLabel, }, ) InstanceTerminationFailuresTotal = opmetrics.NewPrometheusCounter( crmetrics.Registry, prometheus.CounterOpts{ Namespace: metrics.Namespace, Subsystem: cloudProviderSubsystem, Name: "instance_termination_failures_total", Help: "Number of instance termination (TerminateInstances) failures, dimensioned by availability zone and zone ID.", }, []string{ zoneLabel, zoneIDLabel, }, ) )
View Source
var SkipCache = func(opts *options) { opts.SkipCache = true }
Functions ¶
Types ¶
type CapacityReservationDetails ¶ added in v1.10.0
type CapacityReservationDetails struct {
ID string
Type v1.CapacityReservationType
Interruptible bool
}
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 (b *CreateFleetInputBuilder) Build() *ec2.CreateFleetInput
func (*CreateFleetInputBuilder) WithCapacityReservationType ¶ added in v1.6.0
func (b *CreateFleetInputBuilder) WithCapacityReservationType(crt v1.CapacityReservationType, interruptible bool) *CreateFleetInputBuilder
func (*CreateFleetInputBuilder) WithContextID ¶ added in v1.6.0
func (b *CreateFleetInputBuilder) WithContextID(contextID string) *CreateFleetInputBuilder
func (*CreateFleetInputBuilder) WithOverlay ¶ added in v1.7.0
func (b *CreateFleetInputBuilder) WithOverlay() *CreateFleetInputBuilder
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, placementGroupProvider placementgroup.Provider, zonalshiftProvider arczonalshift.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 (*DefaultProvider) Delete ¶ added in v0.36.0
func (p *DefaultProvider) Delete(ctx context.Context, id string) error
type Instance ¶
type Instance struct {
LaunchTime time.Time
State ec2types.InstanceStateName
ID string
ImageID string
Type ec2types.InstanceType
Zone string
ZoneID string
CapacityType string
SecurityGroupIDs []string
SubnetID string
Tags map[string]string
EFACount int
CapacityReservationDetails *CapacityReservationDetails
Tenancy string
PartitionNumber *int32
}
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 NewInstanceFromFleet ¶
func NewInstanceFromFleet( out ec2types.CreateFleetInstance, capacityType string, tags map[string]string, tenancyType string, opts ...NewInstanceFromFleetOpts, ) *Instance
type NewInstanceFromFleetOpts ¶ added in v1.6.0
func WithCapacityReservationDetails ¶ added in v1.6.0
func WithCapacityReservationDetails(capacityReservationDetails *CapacityReservationDetails) NewInstanceFromFleetOpts
func WithEFACount ¶ added in v1.11.0
func WithEFACount(efaCount int) NewInstanceFromFleetOpts
type Provider ¶
type Provider interface {
Create(context.Context, *v1.EC2NodeClass, *karpv1.NodeClaim, map[string]string, []*cloudprovider.InstanceType) (*Instance, error)
// Retrieves instance from a cache with no TTL or EC2. This defaults to cache, use SkipCache to force an EC2 lookup.
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.