fake

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelInstanceSize       = "size"
	ExoticInstanceLabelKey  = "special"
	IntegerInstanceLabelKey = "integer"
)

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

func InstanceTypesAssorted added in v0.8.0

func InstanceTypesAssorted() []cloudprovider.InstanceType

InstanceTypesAssorted create many unique instance types with varying CPU/memory/architecture/OS/zone/capacity type.

Types

type CloudProvider

type CloudProvider struct {
	InstanceTypes []cloudprovider.InstanceType

	CreateCalls []*cloudprovider.NodeRequest
	// contains filtered or unexported fields
}

func (*CloudProvider) Create

func (c *CloudProvider) Create(ctx context.Context, nodeRequest *cloudprovider.NodeRequest) (*v1.Node, error)

func (*CloudProvider) Delete

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

func (*CloudProvider) GetInstanceTypes

func (c *CloudProvider) GetInstanceTypes(_ context.Context, provisioner *v1alpha5.Provisioner) ([]cloudprovider.InstanceType, error)

func (*CloudProvider) Name added in v0.5.3

func (c *CloudProvider) Name() string

Name returns the CloudProvider implementation name.

type InstanceType

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

func NewInstanceType

func NewInstanceType(options InstanceTypeOptions) *InstanceType

func (*InstanceType) Name

func (i *InstanceType) Name() string

func (*InstanceType) Offerings

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

func (*InstanceType) Overhead

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

func (*InstanceType) Requirements added in v0.11.0

func (i *InstanceType) Requirements() scheduling.Requirements

func (*InstanceType) Resources added in v0.7.3

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

type InstanceTypeOptions

type InstanceTypeOptions struct {
	Name             string
	Offerings        []cloudprovider.Offering
	Architecture     string
	OperatingSystems utilsets.String
	Overhead         v1.ResourceList
	Resources        v1.ResourceList
}

Jump to

Keyboard shortcuts

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