Documentation
¶
Index ¶
- Constants
- type UnavailableOfferings
- func (u *UnavailableOfferings) Delete(instanceType ec2types.InstanceType, zone string, capacityType string)
- func (u *UnavailableOfferings) Flush()
- func (u *UnavailableOfferings) IsUnavailable(instanceType ec2types.InstanceType, zone, capacityType string) bool
- func (u *UnavailableOfferings) MarkAZUnavailable(zone string)
- func (u *UnavailableOfferings) MarkCapacityTypeUnavailable(capacityType string)
- func (u *UnavailableOfferings) MarkUnavailable(ctx context.Context, unavailableReason string, ...)
- func (u *UnavailableOfferings) MarkUnavailableForFleetErr(ctx context.Context, fleetErr ec2types.CreateFleetError, capacityType string)
- func (u *UnavailableOfferings) SeqNum(instanceType ec2types.InstanceType) uint64
Constants ¶
View Source
const ( // DefaultTTL restricts QPS to AWS APIs to this interval for verifying setup // resources. This value represents the maximum eventual consistency between // AWS actual state and the controller's ability to provision those // resources. Cache hits enable faster provisioning and reduced API load on // AWS APIs, which can have a serious impact on performance and scalability. // DO NOT CHANGE THIS VALUE WITHOUT DUE CONSIDERATION DefaultTTL = time.Minute // are removed from the cache and are available for launch again UnavailableOfferingsTTL = 3 * time.Minute // CapacityReservationAvailabilityTTL is the time we will persist cached capacity availability. Nominally, this is // updated every minute, but we want to persist the data longer in the event of an EC2 API outage. 24 hours was the // compormise made for API outage reseliency and gargage collecting entries for orphaned reservations. CapacityReservationAvailabilityTTL = 24 * time.Hour // InstanceTypesZonesAndOfferingsTTL is the time before we refresh instance types, zones, and offerings at EC2 InstanceTypesZonesAndOfferingsTTL = 5 * time.Minute // InstanceProfileTTL is the time before we refresh checking instance profile existence at IAM InstanceProfileTTL = 15 * time.Minute // AvailableIPAddressTTL is time to drop AvailableIPAddress data if it is not updated within the TTL AvailableIPAddressTTL = 5 * time.Minute // AvailableIPAddressTTL is time to drop AssociatePublicIPAddressTTL data if it is not updated within the TTL AssociatePublicIPAddressTTL = 5 * time.Minute // SSMGetParametersByPathTTL is the time to drop SSM Parameters by path data. This only queries EKS Optimized AMI // releases, so we should expect this to be updated relatively infrequently. SSMCacheTTL = 24 * time.Hour // DiscoveredCapacityCacheTTL is the time to drop discovered resource capacity data per-instance type // if it is not updated by a node creation event or refreshed during controller reconciliation DiscoveredCapacityCacheTTL = 60 * 24 * time.Hour // ValidationTTL is time to check authorization errors with validation controller ValidationTTL = 30 * time.Minute // RecreationTTL is the duration to suppress instance profile recreation for the same role to avoid duplicates RecreationTTL = 1 * time.Minute // ProtectedProfilesTTL is the duration to keep profiles as protected before nodeclass garbagecollector considers deletion ProtectedProfilesTTL = 1 * time.Hour )
View Source
const ( // DefaultCleanupInterval triggers cache cleanup (lazy eviction) at this interval. DefaultCleanupInterval = time.Minute // We drop the cleanup interval down for the ICE cache to get quicker reactivity to offerings // that become available after they get evicted from the cache UnavailableOfferingsCleanupInterval = time.Second * 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnavailableOfferings ¶
type UnavailableOfferings struct {
// contains filtered or unexported fields
}
UnavailableOfferings stores any offerings that return ICE (insufficient capacity errors) when attempting to launch the capacity. These offerings are ignored as long as they are in the cache on GetInstanceTypes responses
func NewUnavailableOfferings ¶
func NewUnavailableOfferings() *UnavailableOfferings
func (*UnavailableOfferings) Delete ¶
func (u *UnavailableOfferings) Delete(instanceType ec2types.InstanceType, zone string, capacityType string)
func (*UnavailableOfferings) Flush ¶
func (u *UnavailableOfferings) Flush()
func (*UnavailableOfferings) IsUnavailable ¶
func (u *UnavailableOfferings) IsUnavailable(instanceType ec2types.InstanceType, zone, capacityType string) bool
IsUnavailable returns true if the offering appears in the cache
func (*UnavailableOfferings) MarkAZUnavailable ¶ added in v1.6.0
func (u *UnavailableOfferings) MarkAZUnavailable(zone string)
func (*UnavailableOfferings) MarkCapacityTypeUnavailable ¶ added in v1.5.0
func (u *UnavailableOfferings) MarkCapacityTypeUnavailable(capacityType string)
func (*UnavailableOfferings) MarkUnavailable ¶
func (u *UnavailableOfferings) MarkUnavailable(ctx context.Context, unavailableReason string, instanceType ec2types.InstanceType, zone, capacityType string)
MarkUnavailable communicates recently observed temporary capacity shortages in the provided offerings
func (*UnavailableOfferings) MarkUnavailableForFleetErr ¶
func (u *UnavailableOfferings) MarkUnavailableForFleetErr(ctx context.Context, fleetErr ec2types.CreateFleetError, capacityType string)
func (*UnavailableOfferings) SeqNum ¶
func (u *UnavailableOfferings) SeqNum(instanceType ec2types.InstanceType) uint64
SeqNum returns a sequence number for an instance type to capture whether the offering cache has changed for the intance type
Click to show internal directories.
Click to hide internal directories.