cloudprovider

package
v0.0.0-...-a954aad Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider interface {
	// Name returns name of the cloud provider.
	Name() string

	// NodeGroups returns all node groups configured for this cloud provider.
	NodeGroups() []*NodeGroup

	// NodeGroupForNode returns the node group for the given node, nil if the node
	// should not be processed by cluster autoscaler, or non-nil error if such
	// occurred.
	NodeGroupForNode(*kube_api.Node) (*NodeGroup, error)
}

CloudProvider contains configuration info and functions for interacting with cloud provider (GCE, AWS, etc).

type NodeGroup

type NodeGroup interface {
	// MaxSize returns maximum size of the node group.
	MaxSize() int

	// MinSize returns minimum size of the node group.
	MinSize() int

	// Size returns the current size of the node group.
	Size() (int, error)

	// GetSampleNode returns a sample node that belongs to this node group, or error
	// if occurred.
	SampleNode() (*kube_api.Node, error)

	// IncreaseSize increases the size of the node group. To delete a node you need
	// to explicitly name it and use DeleteNode. This function should wait until
	// the node appears in the Kubernetes cluster.
	IncreaseSize(delta int) error

	// DeleteNode deletes the node from this node group. Error is returned either on
	// failure or if the given node doesn't belong to this node group. This function
	// should wait until the node is removed from the Kubernetes cluster.
	DeleteNode(*kube_api.Node) error

	// Id returns an unique identifier of the node group.
	Id() string

	// Debug returns a string containing all information regarding this node group.
	Debug() string
}

NodeGroup contains configuration info and functions to control a set of nodes that have the same capacity and set of labels.

Jump to

Keyboard shortcuts

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