fake

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstanceTypes added in v0.5.3

func InstanceTypes(total int) []cloudprovider.InstanceType

InstanceTypes creates instance types with incrementing resources 2Gi of RAM and 10 pods for every 1vcpu i.e. 1vcpu, 2Gi mem, 10 pods

2vcpu, 4Gi mem, 20 pods
3vcpu, 6Gi mem, 30 pods

Types

type CloudProvider

type CloudProvider struct {
	InstanceTypes []cloudprovider.InstanceType
}

func (*CloudProvider) Create

func (c *CloudProvider) Create(_ context.Context, constraints *v1alpha5.Constraints, instanceTypes []cloudprovider.InstanceType, quantity int, bind func(*v1.Node) error) error

func (*CloudProvider) Default

func (*CloudProvider) Delete

func (c *CloudProvider) Delete(context.Context, *v1.Node) error

func (*CloudProvider) GetInstanceTypes

func (*CloudProvider) Name added in v0.5.3

func (c *CloudProvider) Name() string

Name returns the CloudProvider implementation name.

func (*CloudProvider) Validate

type InstanceType

type InstanceType struct {
	// contains filtered or unexported fields
}

func NewInstanceType

func NewInstanceType(options InstanceTypeOptions) *InstanceType

func (*InstanceType) AMDGPUs

func (i *InstanceType) AMDGPUs() *resource.Quantity

func (*InstanceType) AWSNeurons

func (i *InstanceType) AWSNeurons() *resource.Quantity

func (*InstanceType) AWSPodENI added in v0.5.2

func (i *InstanceType) AWSPodENI() *resource.Quantity

func (*InstanceType) Architecture

func (i *InstanceType) Architecture() string

func (*InstanceType) CPU

func (i *InstanceType) CPU() *resource.Quantity

func (*InstanceType) Memory

func (i *InstanceType) Memory() *resource.Quantity

func (*InstanceType) Name

func (i *InstanceType) Name() string

func (*InstanceType) NvidiaGPUs

func (i *InstanceType) NvidiaGPUs() *resource.Quantity

func (*InstanceType) Offerings

func (i *InstanceType) Offerings() []cloudprovider.Offering

func (*InstanceType) OperatingSystems added in v0.5.2

func (i *InstanceType) OperatingSystems() sets.String

func (*InstanceType) Overhead

func (i *InstanceType) Overhead() v1.ResourceList

func (*InstanceType) Pods

func (i *InstanceType) Pods() *resource.Quantity

type InstanceTypeOptions

type InstanceTypeOptions struct {
	Name             string
	Offerings        []cloudprovider.Offering
	Architecture     string
	OperatingSystems sets.String
	CPU              resource.Quantity
	Memory           resource.Quantity
	Pods             resource.Quantity
	NvidiaGPUs       resource.Quantity
	AMDGPUs          resource.Quantity
	AWSNeurons       resource.Quantity
	AWSPodENI        resource.Quantity
}

Jump to

Keyboard shortcuts

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