nodeselector

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeAllocsTestServer added in v0.3.2

func NodeAllocsTestServer(t *testing.T, cluster string) (*httptest.Server, func())

Types

type ClusterScaleInNodeSelector

type ClusterScaleInNodeSelector interface {

	// Name returns the name of the node selector strategy.
	Name() string

	// Select is used to filter the passed node list, and select an appropriate
	// number of nodes which fit the criteria of the strategy. The return list
	// is not guaranteed to match the required number, nor include any items if
	// selection is impossible. The function will never return more nodes than
	// asked for.
	Select([]*api.NodeListStub, int) []*api.NodeListStub
}

ClusterScaleInNodeSelector is the interface that defines how nodes are selected for termination when performing scale in actions.

func NewSelector

func NewSelector(cfg map[string]string, client *api.Client, log hclog.Logger) (ClusterScaleInNodeSelector, error)

NewSelector takes the user configuration and creates a ClusterScaleInNodeSelector for use. In the event the configuration cannot be understood, an error will be returned.

Jump to

Keyboard shortcuts

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