Documentation
¶
Index ¶
- func IsNodeInterrupted(ctx context.Context, client client.Client, currentNode *corev1.Node) (bool, error)
- func IsNodeShuttingDown(currentNode *corev1.Node) bool
- type ClusterResourcesInfo
- type Controller
- func (c *Controller) GetClusterIDHash() (string, error)
- func (c *Controller) GetReadyInterruptionEvents() (readyEvents []InterruptionEvent)
- func (c *Controller) InsertInterruptionEvent(nodeHashID string, event *InterruptionEvent)
- func (c *Controller) PushInterruptionEvent(ctx context.Context, clusterIDHash string, event InterruptionEvent)
- func (c *Controller) PushTelemetryClusterResourceInfo(ctx context.Context, clusterIDHash string, kubeclient client.Client, ...)
- func (c *Controller) Reconcile(ctx context.Context, node *corev1.Node) (reconcile.Result, error)
- func (c *Controller) Register(ctx context.Context, m manager.Manager) error
- func (c *Controller) Run(ctx context.Context)
- type InterruptionEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNodeInterrupted ¶
func IsNodeShuttingDown ¶
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) 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
}
Click to show internal directories.
Click to hide internal directories.