kubemark

package
v0.0.0-...-0a82f0e Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName is the cloud provider name for kubemark
	ProviderName = "kubemark"
)

Variables

This section is empty.

Functions

func BuildKubemark

BuildKubemark builds Kubemark cloud provider.

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

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

func (nodeGroup *NodeGroup) Autoprovisioned() bool

Autoprovisioned returns true if the node group is autoprovisioned.

func (*NodeGroup) Create

func (nodeGroup *NodeGroup) Create() (cloudprovider.NodeGroup, error)

Create creates the node group on the cloud provider side.

func (*NodeGroup) Debug

func (nodeGroup *NodeGroup) Debug() string

Debug returns a debug string for the nodegroup.

func (*NodeGroup) DecreaseTargetSize

func (nodeGroup *NodeGroup) DecreaseTargetSize(delta int) error

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) Delete

func (nodeGroup *NodeGroup) Delete() error

Delete deletes the node group on the cloud provider side.

func (*NodeGroup) DeleteNodes

func (nodeGroup *NodeGroup) DeleteNodes(nodes []*apiv1.Node) error

DeleteNodes deletes the specified nodes from the node group.

func (*NodeGroup) Exist

func (nodeGroup *NodeGroup) Exist() bool

Exist checks if the node group really exists on the cloud provider side.

func (*NodeGroup) Id

func (nodeGroup *NodeGroup) Id() string

Id returns nodegroup name.

func (*NodeGroup) IncreaseSize

func (nodeGroup *NodeGroup) IncreaseSize(delta int) error

IncreaseSize increases NodeGroup size.

func (*NodeGroup) MaxSize

func (nodeGroup *NodeGroup) MaxSize() int

MaxSize returns maximum size of the node group.

func (*NodeGroup) MinSize

func (nodeGroup *NodeGroup) MinSize() int

MinSize returns minimum size of the node group.

func (*NodeGroup) Nodes

func (nodeGroup *NodeGroup) Nodes() ([]cloudprovider.Instance, error)

Nodes returns a list of all nodes that belong to this node group.

func (*NodeGroup) TargetSize

func (nodeGroup *NodeGroup) TargetSize() (int, error)

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.

Jump to

Keyboard shortcuts

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