Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStrategy ¶
func NewStrategy(pricingModel cloudprovider.PricingModel, preferredNodeProvider PreferredNodeProvider, nodeUnfitness NodeUnfitness, ) expander.Strategy
NewStrategy returns an expansion strategy that picks nodes based on price and preferred node type.
func SimpleNodeUnfitness ¶
SimpleNodeUnfitness returns unfitness based on cpu only.
Types ¶
type NodeUnfitness ¶
NodeUnfitness is a function that returns a value that how much the evaluated node is "different" from the preferred node for the cluster. The value should be greater or equal 1 where 1 means that the node is perfect. 10 means that the node is very unfitted, although there is no upper bound on the value of this function.
type PreferredNodeProvider ¶
type PreferredNodeProvider interface { // Node returns the preferred node for the cluster Node() (*apiv1.Node, error) }
PreferredNodeProvider provides a node that would be, in-longer run, the most suited to the cluster needs.
type SimplePreferredNodeProvider ¶
type SimplePreferredNodeProvider struct {
// contains filtered or unexported fields
}
SimplePreferredNodeProvider returns preferred node based on the cluster size.
func NewSimplePreferredNodeProvider ¶
func NewSimplePreferredNodeProvider(nodeLister kube_util.NodeLister) *SimplePreferredNodeProvider
NewSimplePreferredNodeProvider returns simple PreferredNodeProvider