Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultTTL restricts to Ali APIs to this interval for verifying setup // resources. This value represents the maximum eventual consistency between // Ali actual state and the controller's ability to provision those // resources. Cache hits enable faster provisioning and reduced API load on // Ali APIs, which can have a serious impact on performance and scalability. // DO NOT CHANGE THIS VALUE WITHOUT DUE CONSIDERATION DefaultTTL = time.Minute // KubernetesVersionTTL is the time before the detected Kubernetes version is removed from cache, // to be re-detected the next time it is needed. KubernetesVersionTTL = 15 * time.Minute // are removed from the cache and are available for launch again UnavailableOfferingsTTL = 3 * time.Minute // AvailableIPAddressTTL is time to drop AvailableIPAddress data if it is not updated within the TTL AvailableIPAddressTTL = 5 * time.Minute // InstanceTypeAvailableDiskTTL is the time refresh InstanceType compatible disk InstanceTypeAvailableDiskTTL = 30 * time.Minute // ClusterAttachScriptTTL is the time refresh for the cluster attach script ClusterAttachScriptTTL = 6 * time.Hour // DefaultCleanupInterval triggers cache cleanup (lazy eviction) at this interval. DefaultCleanupInterval = 1 * 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 // InstanceTypesAndZonesTTL is the time before we refresh instance types and zones at ECS InstanceTypesAndZonesTTL = 5 * time.Minute )
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 NewUnavailableOfferingsWithCache ¶
func NewUnavailableOfferingsWithCache(c *cache.Cache) *UnavailableOfferings
func (*UnavailableOfferings) Flush ¶
func (u *UnavailableOfferings) Flush()
func (*UnavailableOfferings) IsUnavailable ¶
func (u *UnavailableOfferings) IsUnavailable(instanceType, zone, capacityType string) bool
IsUnavailable returns true if the offering appears in the cache
func (*UnavailableOfferings) MarkUnavailable ¶
func (u *UnavailableOfferings) MarkUnavailable(ctx context.Context, unavailableReason, instanceType, zone, capacityType string)
MarkUnavailable communicates recently observed temporary capacity shortages in the provided offerings
func (*UnavailableOfferings) MarkUnavailableWithTTL ¶
func (u *UnavailableOfferings) MarkUnavailableWithTTL(ctx context.Context, unavailableReason, instanceType, zone, capacityType string, ttl time.Duration)
MarkUnavailableWithTTL allows us to mark an offering unavailable with a custom TTL
Click to show internal directories.
Click to hide internal directories.