Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ReceivedMessages = opmetrics.NewPrometheusCounter( crmetrics.Registry, prometheus.CounterOpts{ Namespace: metrics.Namespace, Subsystem: interruptionSubsystem, Name: "received_messages_total", Help: "Count of messages received from the SQS queue. Broken down by message type and whether the message was actionable.", }, []string{messageTypeLabel}, ) DeletedMessages = opmetrics.NewPrometheusCounter( crmetrics.Registry, prometheus.CounterOpts{ Namespace: metrics.Namespace, Subsystem: interruptionSubsystem, Name: "deleted_messages_total", Help: "Count of messages deleted from the SQS queue.", }, []string{}, ) MessageLatency = opmetrics.NewPrometheusHistogram( crmetrics.Registry, prometheus.HistogramOpts{ Namespace: metrics.Namespace, Subsystem: interruptionSubsystem, Name: "message_queue_duration_seconds", Help: "Amount of time an interruption message is on the queue before it is processed by karpenter.", Buckets: metrics.DurationBuckets(), }, []string{}, ) )
View Source
var ( DefaultParsers = []messages.Parser{ statechange.Parser{}, spotinterruption.Parser{}, scheduledchange.Parser{}, rebalancerecommendation.Parser{}, } )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is an AWS interruption controller. It continually polls an SQS queue for events from aws.ec2 and aws.health that trigger node health events or node spot interruption/rebalance events.
func NewController ¶
func NewController( kubeClient client.Client, cloudProvider cloudprovider.CloudProvider, clk clock.Clock, recorder events.Recorder, sqsProvider sqs.Provider, unavailableOfferingsCache *cache.UnavailableOfferings, ) *Controller
type EventParser ¶
type EventParser struct {
// contains filtered or unexported fields
}
func NewEventParser ¶
func NewEventParser(parsers ...messages.Parser) *EventParser
Click to show internal directories.
Click to hide internal directories.