scheduling

package
v0.8.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate

func Calculate(req router.Request, resp router.Response) error

Calculate is a handler that sets the scheduling rules for an AppInstance to its status if and only if its generation is different from its observedGeneration.

This is necessary because querying for scheduling rules will result in all running AppInstances using the backing resources (the Acorn Config or a ComputeClass, for example) to be redeployed when the resources change. By calculating scheduling rules only when the generation changes, we can ensure that updated backing resources are only applied when an AppInstance is updated directly.

func Nodes

Nodes returns the Affinity and Tolerations from a ComputeClass if they exist

func PriorityClassName

func PriorityClassName(req router.Request, computeClass *adminv1.ProjectComputeClassInstance) (string, error)

PriorityClass checks that a defined PriorityClass exists and returns the name of it

func ResourceRequirements

func ResourceRequirements(req router.Request, app *v1.AppInstance, containerName string, container v1.Container, computeClass *adminv1.ProjectComputeClassInstance) (*corev1.ResourceRequirements, error)

ResourceRequirements determines the cpu and memory amount to be set for the limits/requests of the Pod

Types

This section is empty.

Jump to

Keyboard shortcuts

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