Documentation ¶
Index ¶
- func Calculate(req router.Request, resp router.Response) error
- func Nodes(req router.Request, computeClass *adminv1.ProjectComputeClassInstance) (*corev1.Affinity, []corev1.Toleration)
- func ResourceRequirements(req router.Request, app *v1.AppInstance, containerName string, ...) (*corev1.ResourceRequirements, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Calculate ¶
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 ¶
func Nodes(req router.Request, computeClass *adminv1.ProjectComputeClassInstance) (*corev1.Affinity, []corev1.Toleration)
Nodes returns the Affinity and Tolerations from a ComputeClass if they exist
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.