Documentation ¶
Index ¶
- Constants
- type KubemarkCloudProvider
- func (kubemark *KubemarkCloudProvider) Cleanup() error
- func (kubemark *KubemarkCloudProvider) GetAvailableMachineTypes() ([]string, error)
- func (kubemark *KubemarkCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
- func (kubemark *KubemarkCloudProvider) Name() string
- func (kubemark *KubemarkCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, ...) (cloudprovider.NodeGroup, error)
- func (kubemark *KubemarkCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error)
- func (kubemark *KubemarkCloudProvider) NodeGroups() []cloudprovider.NodeGroup
- func (kubemark *KubemarkCloudProvider) Pricing() (cloudprovider.PricingModel, errors.AutoscalerError)
- func (kubemark *KubemarkCloudProvider) Refresh() error
- type NodeGroup
- func (nodeGroup *NodeGroup) Autoprovisioned() bool
- func (nodeGroup *NodeGroup) Create() error
- func (nodeGroup *NodeGroup) Debug() string
- func (nodeGroup *NodeGroup) DecreaseTargetSize(delta int) error
- func (nodeGroup *NodeGroup) Delete() error
- func (nodeGroup *NodeGroup) DeleteNodes(nodes []*apiv1.Node) error
- func (nodeGroup *NodeGroup) Exist() bool
- func (nodeGroup *NodeGroup) Id() string
- func (nodeGroup *NodeGroup) IncreaseSize(delta int) error
- func (nodeGroup *NodeGroup) MaxSize() int
- func (nodeGroup *NodeGroup) MinSize() int
- func (nodeGroup *NodeGroup) Nodes() ([]string, error)
- func (nodeGroup *NodeGroup) TargetSize() (int, error)
- func (nodeGroup *NodeGroup) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
Constants ¶
const (
// ProviderName is the cloud provider name for kubemark
ProviderName = "kubemark"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubemarkCloudProvider ¶
type KubemarkCloudProvider struct {
// contains filtered or unexported fields
}
KubemarkCloudProvider implements CloudProvider interface for kubemark
func BuildKubemarkCloudProvider ¶
func BuildKubemarkCloudProvider(kubemarkController *kubemark.KubemarkController, specs []string, resourceLimiter *cloudprovider.ResourceLimiter) (*KubemarkCloudProvider, error)
BuildKubemarkCloudProvider builds a CloudProvider for kubemark. Builds node groups from passed in specs.
func (*KubemarkCloudProvider) Cleanup ¶
func (kubemark *KubemarkCloudProvider) Cleanup() error
Cleanup cleans up all resources before the cloud provider is removed
func (*KubemarkCloudProvider) GetAvailableMachineTypes ¶
func (kubemark *KubemarkCloudProvider) GetAvailableMachineTypes() ([]string, error)
GetAvailableMachineTypes get all machine types that can be requested from the cloud provider. Implementation optional.
func (*KubemarkCloudProvider) GetResourceLimiter ¶
func (kubemark *KubemarkCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
GetResourceLimiter returns struct containing limits (max, min) for resources (cores, memory etc.).
func (*KubemarkCloudProvider) Name ¶
func (kubemark *KubemarkCloudProvider) Name() string
Name returns name of the cloud provider.
func (*KubemarkCloudProvider) NewNodeGroup ¶
func (kubemark *KubemarkCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, taints []apiv1.Taint, extraResources map[string]resource.Quantity) (cloudprovider.NodeGroup, error)
NewNodeGroup builds a theoretical node group based on the node definition provided.
func (*KubemarkCloudProvider) NodeGroupForNode ¶
func (kubemark *KubemarkCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error)
NodeGroupForNode returns the node group for the given node.
func (*KubemarkCloudProvider) NodeGroups ¶
func (kubemark *KubemarkCloudProvider) NodeGroups() []cloudprovider.NodeGroup
NodeGroups returns all node groups configured for this cloud provider.
func (*KubemarkCloudProvider) Pricing ¶
func (kubemark *KubemarkCloudProvider) Pricing() (cloudprovider.PricingModel, errors.AutoscalerError)
Pricing returns pricing model for this cloud provider or error if not available.
func (*KubemarkCloudProvider) Refresh ¶
func (kubemark *KubemarkCloudProvider) Refresh() error
Refresh is called before every main loop and can be used to dynamically update cloud provider state. In particular the list of node groups returned by NodeGroups can change as a result of CloudProvider.Refresh().
type NodeGroup ¶
type NodeGroup struct { Name string // contains filtered or unexported fields }
NodeGroup implements NodeGroup interface.
func (*NodeGroup) Autoprovisioned ¶
Autoprovisioned returns true if the node group is autoprovisioned.
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.
func (*NodeGroup) DeleteNodes ¶
DeleteNodes deletes the specified nodes from the node group.
func (*NodeGroup) IncreaseSize ¶
IncreaseSize increases NodeGroup size.
func (*NodeGroup) TargetSize ¶
TargetSize returns the current TARGET size of the node group. It is possible that the number is different from the number of nodes registered in Kubernetes.
func (*NodeGroup) TemplateNodeInfo ¶
func (nodeGroup *NodeGroup) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
TemplateNodeInfo returns a node template for this node group.