Documentation ¶
Index ¶
- Constants
- func BuildScaleway(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, ...) cloudprovider.CloudProvider
- type NodeGroup
- func (ng *NodeGroup) AtomicIncreaseSize(delta int) error
- func (ng *NodeGroup) Autoprovisioned() bool
- func (ng *NodeGroup) Create() (cloudprovider.NodeGroup, error)
- func (ng *NodeGroup) Debug() string
- func (ng *NodeGroup) DecreaseTargetSize(delta int) error
- func (ng *NodeGroup) Delete() error
- func (ng *NodeGroup) DeleteNodes(nodes []*apiv1.Node) error
- func (ng *NodeGroup) Exist() bool
- func (ng *NodeGroup) ForceDeleteNodes(nodes []*apiv1.Node) error
- func (ng *NodeGroup) GetOptions(defaults config.NodeGroupAutoscalingOptions) (*config.NodeGroupAutoscalingOptions, error)
- func (ng *NodeGroup) Id() string
- func (ng *NodeGroup) IncreaseSize(delta int) error
- func (ng *NodeGroup) MaxSize() int
- func (ng *NodeGroup) MinSize() int
- func (ng *NodeGroup) Nodes() ([]cloudprovider.Instance, error)
- func (ng *NodeGroup) TargetSize() (int, error)
- func (ng *NodeGroup) TemplateNodeInfo() (*framework.NodeInfo, error)
Constants ¶
const (
// GPULabel is the label added to GPU nodes
GPULabel = "k8s.scaleway.com/gpu"
)
Variables ¶
This section is empty.
Functions ¶
func BuildScaleway ¶
func BuildScaleway( opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, ) cloudprovider.CloudProvider
BuildScaleway returns CloudProvider implementation for Scaleway.
Types ¶
type NodeGroup ¶
type NodeGroup struct { scalewaygo.Client // contains filtered or unexported fields }
NodeGroup implements cloudprovider.NodeGroup interface. it is used to resize a Scaleway Pool which is a group of nodes with the same capacity.
func (*NodeGroup) AtomicIncreaseSize ¶
AtomicIncreaseSize is not implemented.
func (*NodeGroup) Autoprovisioned ¶
Autoprovisioned returns true if the node group is autoprovisioned.
func (*NodeGroup) Create ¶
func (ng *NodeGroup) Create() (cloudprovider.NodeGroup, error)
Create creates the node group on the cloud provider side.
func (*NodeGroup) Debug ¶
Debug returns a string containing all information regarding this node group.
func (*NodeGroup) DecreaseTargetSize ¶
DecreaseTargetSize decreases the target size of the node group. This function doesn't permit to delete any existing node and can be used only to reduce the request for new nodes that have not been yet fulfilled. Delta should be negative. It is assumed that cloud provider will not delete the existing nodes when there is an option to just decrease the target.
func (*NodeGroup) DeleteNodes ¶
DeleteNodes deletes nodes 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 node group size is updated.
func (*NodeGroup) Exist ¶
Exist checks if the node group really exists on the cloud provider side. Allows to tell the theoretical node group from the real one.
func (*NodeGroup) ForceDeleteNodes ¶
ForceDeleteNodes deletes nodes from the group regardless of constraints.
func (*NodeGroup) GetOptions ¶
func (ng *NodeGroup) GetOptions(defaults config.NodeGroupAutoscalingOptions) (*config.NodeGroupAutoscalingOptions, error)
GetOptions returns nil which means 'use defaults options'
func (*NodeGroup) IncreaseSize ¶
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 node group size is updated.
func (*NodeGroup) Nodes ¶
func (ng *NodeGroup) Nodes() ([]cloudprovider.Instance, error)
Nodes returns a list of all nodes that belong to this node group.
func (*NodeGroup) TargetSize ¶
TargetSize returns the current target size of the node group. It is possible that the number of nodes in Kubernetes is different at the moment but should be equal to Size() once everything stabilizes (new nodes finish startup and registration or removed nodes are deleted completely).
func (*NodeGroup) TemplateNodeInfo ¶
TemplateNodeInfo returns a framework.NodeInfo structure of an empty (as if just started) node. This will be used in scale-up simulations to predict what would a new node look like if a node group was expanded. The returned NodeInfo is expected to have a fully populated Node object, with all of the labels, capacity and allocatable information as well as all pods that are started on the node by default, using manifest (most likely only kube-proxy).