computeclasses

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMemoryForClass = errors.New("memory is invalid")
	ErrInvalidClass          = errors.New("compute class is invalid")
)

Functions

func GetAsProjectComputeClassInstance

func GetAsProjectComputeClassInstance(ctx context.Context, c client.Client, namespace string, computeClass string) (*internaladminv1.ProjectComputeClassInstance, error)

GetAsProjectComputeClassInstance grabs the ComputeClass spec (agnostic of it being cluster or project scoped) for the provided ComputeClass name.

func GetClassForWorkload

func GetClassForWorkload(ctx context.Context, c client.Client, computeClasses internalv1.ComputeClassMap, container internalv1.Container, workload, namespace string) (*internaladminv1.ProjectComputeClassInstance, error)

GetClassForWorkload determines what ComputeClass should be used for the given appInstance, container and workload.

func GetComputeClassNameForWorkload

func GetComputeClassNameForWorkload(workload string, container internalv1.Container, computeClasses internalv1.ComputeClassMap) string

func GetDefaultComputeClass

func GetDefaultComputeClass(ctx context.Context, c client.Client, namespace string) (string, error)

func ParseComputeClassMemory

func ParseComputeClassMemory(memory apiv1.ComputeClassMemory) (memoryQuantities, error)

func ParseComputeClassMemoryInternal added in v0.10.0

func ParseComputeClassMemoryInternal(memory internaladminv1.ComputeClassMemory) (memoryQuantities, error)

func Validate

func Validate(cc apiv1.ComputeClass, memory resource.Quantity, memDefault *int64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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