handler

package
v0.11.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

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

func (*SpotHandler) Run

func (g *SpotHandler) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL