Documentation ¶
Index ¶
- Constants
- func BuildHetzner(_ config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, ...) cloudprovider.CloudProvider
- type ClusterConfig
- type HetznerCloudProvider
- func (d *HetznerCloudProvider) Cleanup() error
- func (d *HetznerCloudProvider) GPULabel() string
- func (d *HetznerCloudProvider) GetAvailableGPUTypes() map[string]struct{}
- func (d *HetznerCloudProvider) GetAvailableMachineTypes() ([]string, error)
- func (d *HetznerCloudProvider) GetNodeGpuConfig(node *apiv1.Node) *cloudprovider.GpuConfig
- func (d *HetznerCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
- func (d *HetznerCloudProvider) HasInstance(node *apiv1.Node) (bool, error)
- func (d *HetznerCloudProvider) Name() string
- func (d *HetznerCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, ...) (cloudprovider.NodeGroup, error)
- func (d *HetznerCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error)
- func (d *HetznerCloudProvider) NodeGroups() []cloudprovider.NodeGroup
- func (d *HetznerCloudProvider) Pricing() (cloudprovider.PricingModel, autoscalerErrors.AutoscalerError)
- func (d *HetznerCloudProvider) Refresh() error
- type ImageList
- type LegacyConfig
- type NodeConfig
Constants ¶
const (
// GPULabel is the label added to nodes with GPU resource.
GPULabel = hcloudLabelNamespace + "/gpu-node"
)
Variables ¶
This section is empty.
Functions ¶
func BuildHetzner ¶
func BuildHetzner(_ config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider
BuildHetzner builds the Hetzner cloud provider.
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { ImagesForArch ImageList NodeConfigs map[string]*NodeConfig IsUsingNewFormat bool LegacyConfig LegacyConfig }
ClusterConfig holds the configuration for all the nodepools
type HetznerCloudProvider ¶
type HetznerCloudProvider struct {
// contains filtered or unexported fields
}
HetznerCloudProvider implements CloudProvider interface.
func (*HetznerCloudProvider) Cleanup ¶
func (d *HetznerCloudProvider) Cleanup() error
Cleanup cleans up open resources before the cloud provider is destroyed, i.e. go routines etc.
func (*HetznerCloudProvider) GPULabel ¶
func (d *HetznerCloudProvider) GPULabel() string
GPULabel returns the label added to nodes with GPU resource.
func (*HetznerCloudProvider) GetAvailableGPUTypes ¶
func (d *HetznerCloudProvider) GetAvailableGPUTypes() map[string]struct{}
GetAvailableGPUTypes return all available GPU types cloud provider supports.
func (*HetznerCloudProvider) GetAvailableMachineTypes ¶
func (d *HetznerCloudProvider) GetAvailableMachineTypes() ([]string, error)
GetAvailableMachineTypes get all machine types that can be requested from the cloud provider. Implementation optional.
func (*HetznerCloudProvider) GetNodeGpuConfig ¶
func (d *HetznerCloudProvider) GetNodeGpuConfig(node *apiv1.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 (*HetznerCloudProvider) GetResourceLimiter ¶
func (d *HetznerCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
GetResourceLimiter returns struct containing limits (max, min) for resources (cores, memory etc.).
func (*HetznerCloudProvider) HasInstance ¶
func (d *HetznerCloudProvider) HasInstance(node *apiv1.Node) (bool, error)
HasInstance returns whether a given node has a corresponding instance in this cloud provider
func (*HetznerCloudProvider) Name ¶
func (d *HetznerCloudProvider) Name() string
Name returns name of the cloud provider.
func (*HetznerCloudProvider) NewNodeGroup ¶
func (d *HetznerCloudProvider) 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. The node group is not automatically created on the cloud provider side. The node group is not returned by NodeGroups() until it is created. Implementation optional.
func (*HetznerCloudProvider) NodeGroupForNode ¶
func (d *HetznerCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error)
NodeGroupForNode returns the node group for the given node, nil if the node should not be processed by cluster autoscaler, or non-nil error if such occurred. Must be implemented.
func (*HetznerCloudProvider) NodeGroups ¶
func (d *HetznerCloudProvider) NodeGroups() []cloudprovider.NodeGroup
NodeGroups returns all node groups configured for this cloud provider.
func (*HetznerCloudProvider) Pricing ¶
func (d *HetznerCloudProvider) Pricing() (cloudprovider.PricingModel, autoscalerErrors.AutoscalerError)
Pricing returns pricing model for this cloud provider or error if not available. Implementation optional.
func (*HetznerCloudProvider) Refresh ¶
func (d *HetznerCloudProvider) 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 LegacyConfig ¶
LegacyConfig holds the configuration in the legacy format