claudie_provider

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default GPU label.
	GpuLabel = "claudie.io/gpu-node"
)

Variables

View Source
var (
	// ErrNotImplemented used for functions which are not implemented.
	ErrNotImplemented = errors.New("not implemented")
	// ErrConfigInDeletion returned when the desired state of the config is nil and cannot perform a refresh operation.
	ErrConfigInDeletion = errors.New("config is marked for deletion")
)

Functions

This section is empty.

Types

type ClaudieCloudProvider

type ClaudieCloudProvider struct {
	protos.UnimplementedCloudProviderServer
	// contains filtered or unexported fields
}

func NewClaudieCloudProvider

func NewClaudieCloudProvider(projectName, clusterName string) *ClaudieCloudProvider

NewClaudieCloudProvider returns a ClaudieCloudProvider with initialized caches.

func (*ClaudieCloudProvider) Cleanup

Cleanup cleans up open resources before the cloud provider is destroyed, i.e. go routines etc.

func (*ClaudieCloudProvider) GPULabel

GPULabel returns the label added to nodes with GPU resource.

func (*ClaudieCloudProvider) GetAvailableGPUTypes

GetAvailableGPUTypes return all available GPU types cloud provider supports.

func (*ClaudieCloudProvider) NodeGroupDecreaseTargetSize

NodeGroupDecreaseTargetSize 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 if the size when there is an option to just decrease the target.

func (*ClaudieCloudProvider) NodeGroupDeleteNodes

NodeGroupDeleteNodes deletes nodes from this node group (and also decreasing the size of the node group with that). 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 (*ClaudieCloudProvider) NodeGroupForNode

NodeGroupForNode returns the node group for the given node. The node group id is an empty string if the node should not be processed by cluster autoscaler.

func (*ClaudieCloudProvider) NodeGroupGetOptions

NodeGroupGetOptions returns NodeGroupAutoscalingOptions that should be used for this particular NodeGroup. Returning a grpc error will result in using default options. Implementation optional

func (*ClaudieCloudProvider) NodeGroupIncreaseSize

NodeGroupIncreaseSize increases the size of the node group. To delete a node you need to explicitly name it and use NodeGroupDeleteNodes. This function should wait until node group size is updated.

func (*ClaudieCloudProvider) NodeGroupNodes

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

func (*ClaudieCloudProvider) NodeGroupTargetSize

NodeGroupTargetSize 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 the size of a node group once everything stabilizes (new nodes finish startup and registration or removed nodes are deleted completely).

func (*ClaudieCloudProvider) NodeGroupTemplateNodeInfo

NodeGroupTemplateNodeInfo returns a structure of an empty (as if just started) node, with all of the labels, capacity and allocatable information. This will be used in scale-up simulations to predict what would a new node look like if a node group was expanded. Implementation optional.

func (*ClaudieCloudProvider) NodeGroups

NodeGroups returns all node groups configured for this cloud provider.

func (*ClaudieCloudProvider) PricingNodePrice

PricingNodePrice returns a theoretical minimum price of running a node for a given period of time on a perfectly matching machine. Implementation optional.

func (*ClaudieCloudProvider) PricingPodPrice

PricingPodPrice returns a theoretical minimum price of running a pod for a given period of time on a perfectly matching machine. Implementation optional.

func (*ClaudieCloudProvider) Refresh

Refresh is called before every main loop and can be used to dynamically update cloud provider state.

Jump to

Keyboard shortcuts

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