Documentation ¶
Index ¶
- func BuildRancher(opts config.AutoscalingOptions, _ cloudprovider.NodeGroupDiscoveryOptions, ...) cloudprovider.CloudProvider
- type RancherCloudProvider
- func (provider *RancherCloudProvider) Cleanup() error
- func (provider *RancherCloudProvider) GPULabel() string
- func (provider *RancherCloudProvider) GetAvailableGPUTypes() map[string]struct{}
- func (provider *RancherCloudProvider) GetAvailableMachineTypes() ([]string, error)
- func (provider *RancherCloudProvider) GetNodeGpuConfig(node *corev1.Node) *cloudprovider.GpuConfig
- func (provider *RancherCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
- func (provider *RancherCloudProvider) HasInstance(node *corev1.Node) (bool, error)
- func (provider *RancherCloudProvider) Name() string
- func (provider *RancherCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, ...) (cloudprovider.NodeGroup, error)
- func (provider *RancherCloudProvider) NodeGroupForNode(node *corev1.Node) (cloudprovider.NodeGroup, error)
- func (provider *RancherCloudProvider) NodeGroups() []cloudprovider.NodeGroup
- func (provider *RancherCloudProvider) Pricing() (cloudprovider.PricingModel, autoscalererrors.AutoscalerError)
- func (provider *RancherCloudProvider) Refresh() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRancher ¶
func BuildRancher(opts config.AutoscalingOptions, _ cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider
BuildRancher builds rancher cloud provider.
Types ¶
type RancherCloudProvider ¶
type RancherCloudProvider struct {
// contains filtered or unexported fields
}
RancherCloudProvider implements CloudProvider interface for rancher
func (*RancherCloudProvider) Cleanup ¶
func (provider *RancherCloudProvider) Cleanup() error
Cleanup cleans up all resources before the cloud provider is removed
func (*RancherCloudProvider) GPULabel ¶
func (provider *RancherCloudProvider) GPULabel() string
GPULabel returns the label added to nodes with GPU resource.
func (*RancherCloudProvider) GetAvailableGPUTypes ¶
func (provider *RancherCloudProvider) GetAvailableGPUTypes() map[string]struct{}
GetAvailableGPUTypes return all available GPU types cloud provider supports
func (*RancherCloudProvider) GetAvailableMachineTypes ¶
func (provider *RancherCloudProvider) GetAvailableMachineTypes() ([]string, error)
GetAvailableMachineTypes get all machine types that can be requested from the cloud provider. Implementation optional.
func (*RancherCloudProvider) GetNodeGpuConfig ¶
func (provider *RancherCloudProvider) GetNodeGpuConfig(node *corev1.Node) *cloudprovider.GpuConfig
GetNodeGpuConfig returns the label, type and resource name for the GPU added to node. If node doesn't have any GPUs, it returns nil.
func (*RancherCloudProvider) GetResourceLimiter ¶
func (provider *RancherCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
GetResourceLimiter returns struct containing limits (max, min) for resources (cores, memory etc.).
func (*RancherCloudProvider) HasInstance ¶
func (provider *RancherCloudProvider) HasInstance(node *corev1.Node) (bool, error)
HasInstance returns whether a given node has a corresponding instance in this cloud provider
func (*RancherCloudProvider) Name ¶
func (provider *RancherCloudProvider) Name() string
Name returns name of the cloud provider.
func (*RancherCloudProvider) NewNodeGroup ¶
func (provider *RancherCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, taints []corev1.Taint, extraResources map[string]resource.Quantity) (cloudprovider.NodeGroup, error)
NewNodeGroup builds a theoretical node group based on the node definition provided.
func (*RancherCloudProvider) NodeGroupForNode ¶
func (provider *RancherCloudProvider) NodeGroupForNode(node *corev1.Node) (cloudprovider.NodeGroup, error)
NodeGroupForNode returns the node group for the given node.
func (*RancherCloudProvider) NodeGroups ¶
func (provider *RancherCloudProvider) NodeGroups() []cloudprovider.NodeGroup
NodeGroups returns all node groups configured for this cloud provider.
func (*RancherCloudProvider) Pricing ¶
func (provider *RancherCloudProvider) Pricing() (cloudprovider.PricingModel, autoscalererrors.AutoscalerError)
Pricing returns pricing model for this cloud provider or error if not available.
func (*RancherCloudProvider) Refresh ¶
func (provider *RancherCloudProvider) 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().