Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSpec = errors.New("Invalid InstanceClass spec") ErrNotFound = errors.New("Instance Type not found") )
Functions ¶
func CalculateNodeTemplateCapacity ¶
func CalculateNodeTemplateCapacity(instanceClassName string, instanceClassSpec interface{}, catalog *InstanceTypesCatalog) (*v1alpha1.InstanceType, error)
CalculateNodeTemplateCapacity calculates capacity of the node based on InstanceClass and it's spec
Types ¶
type Capacity ¶
type Capacity struct { CPU resource.Quantity `json:"cpu,omitempty"` Memory resource.Quantity `json:"memory,omitempty"` }
Capacity node capacity for autoscaler
func (*Capacity) ToInstanceType ¶ added in v1.46.0
func (c *Capacity) ToInstanceType() *v1alpha1.InstanceType
type InstanceTypesCatalog ¶ added in v1.46.0
type InstanceTypesCatalog struct {
Types map[string]v1alpha1.InstanceType
}
func NewInstanceTypesCatalog ¶ added in v1.46.0
func NewInstanceTypesCatalog(types []v1alpha1.InstanceType) *InstanceTypesCatalog
func (*InstanceTypesCatalog) Get ¶ added in v1.46.0
func (c *InstanceTypesCatalog) Get(ic instanceClass) (*v1alpha1.InstanceType, error)
Click to show internal directories.
Click to hide internal directories.