telemetry

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNodeInterrupted

func IsNodeInterrupted(ctx context.Context, client client.Client, currentNode *corev1.Node) (bool, error)

func IsNodeShuttingDown

func IsNodeShuttingDown(currentNode *corev1.Node) bool

Types

type ClusterResourcesInfo

type ClusterResourcesInfo struct {
	CPUUsage    int64 `json:"cpuUsage"`
	MemoryUsage int64 `json:"memoryUsage"`

	CPURequest    int64 `json:"cpuRequest"`
	MemoryRequest int64 `json:"memoryRequest"`

	CPUCapacity    int64 `json:"cpuCapacity"`
	MemoryCapacity int64 `json:"memoryCapacity"`

	InstanceTypes []string `json:"instanceTypes"`
}

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(kubeClient client.Client, metricClient metricsclientset.Interface) *Controller

func (*Controller) GetClusterIDHash

func (c *Controller) GetClusterIDHash() (string, error)

func (*Controller) GetReadyInterruptionEvents

func (c *Controller) GetReadyInterruptionEvents() (readyEvents []InterruptionEvent)

func (*Controller) InsertInterruptionEvent

func (c *Controller) InsertInterruptionEvent(nodeHashID string, event *InterruptionEvent)

func (*Controller) PushInterruptionEvent

func (c *Controller) PushInterruptionEvent(ctx context.Context, clusterIDHash string, event InterruptionEvent)

func (*Controller) PushTelemetryClusterResourceInfo

func (c *Controller) PushTelemetryClusterResourceInfo(ctx context.Context, clusterIDHash string, kubeclient client.Client, metricClient metricsclientset.Interface)

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, node *corev1.Node) (reconcile.Result, error)

func (*Controller) Register

func (c *Controller) Register(ctx context.Context, m manager.Manager) error

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

type InterruptionEvent

type InterruptionEvent struct {
	CloudProvider           string    `json:"cloudProvider"`
	Timestamp               time.Time `json:"timestamp"`
	Region                  string    `json:"region"`
	Zone                    string    `json:"zone"`
	InstanceType            string    `json:"instanceType"`
	InstanceCreateTimestamp time.Time `json:"instanceCreateTimestamp"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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