Documentation ¶
Index ¶
Constants ¶
View Source
const CastNodeIDLabel = "provisioner.cast.ai/node-id"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataChecker ¶ added in v0.11.0
type MetadataChecker interface { CheckInterrupt(ctx context.Context) (bool, error) CheckRebalanceRecommendation(ctx context.Context) (bool, error) }
func NewAWSInterruptChecker ¶
func NewAWSInterruptChecker() MetadataChecker
func NewAzureInterruptChecker ¶
func NewAzureInterruptChecker() MetadataChecker
NewAzureInterruptChecker checks for azure spot interrupt event from metadata server. See https://docs.microsoft.com/en-us/azure/virtual-machines/linux/scheduled-events#endpoint-discovery
func NewGCPChecker ¶
func NewGCPChecker() MetadataChecker
NewGCPChecker checks for gcp spot interrupt event from metadata server.
type SpotHandler ¶
type SpotHandler struct {
// contains filtered or unexported fields
}
func NewSpotHandler ¶
func NewSpotHandler( log logrus.FieldLogger, castClient castai.Client, clientset kubernetes.Interface, metadataChecker MetadataChecker, pollWaitInterval time.Duration, nodeName string, ) *SpotHandler
Click to show internal directories.
Click to hide internal directories.