aaq_evaluator

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AaqCalculator added in v1.1.6

type AaqCalculator interface {
	PodUsageFunc(pod *corev1.Pod, podsState []*corev1.Pod) (corev1.ResourceList, error, bool)
}

type AaqEvaluator

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

func NewAaqEvaluator

func NewAaqEvaluator(podLister v1.PodLister, aaqEvalRegistery Registry, clock clock.Clock) *AaqEvaluator

NewAaqEvaluator returns an evaluator that can evaluate pods with apps consideration

func (*AaqEvaluator) CalculatorUsage

func (aaqe *AaqEvaluator) CalculatorUsage(pod *corev1.Pod, existingPods []*corev1.Pod) (corev1.ResourceList, error)

func (*AaqEvaluator) Constraints

func (aaqe *AaqEvaluator) Constraints(_ []corev1.ResourceName, _ runtime.Object) error

func (*AaqEvaluator) GroupResource

func (aaqe *AaqEvaluator) GroupResource() schema.GroupResource

func (*AaqEvaluator) Handles

func (aaqe *AaqEvaluator) Handles(operation admission.Attributes) bool

func (*AaqEvaluator) Matches

func (aaqe *AaqEvaluator) Matches(resourceQuota *corev1.ResourceQuota, item runtime.Object) (bool, error)

func (*AaqEvaluator) MatchingResources

func (aaqe *AaqEvaluator) MatchingResources(input []corev1.ResourceName) []corev1.ResourceName

func (*AaqEvaluator) UncoveredQuotaScopes

func (*AaqEvaluator) Usage

func (aaqe *AaqEvaluator) Usage(item runtime.Object) (corev1.ResourceList, error)

func (*AaqEvaluator) UsageStats

func (aaqe *AaqEvaluator) UsageStats(options v12.UsageStatsOptions) (v12.UsageStats, error)

UsageStats calculates aggregate usage for the object.

type AaqEvaluatorRegistry added in v1.1.6

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

func GetAaqEvaluatorsRegistry added in v1.1.6

func GetAaqEvaluatorsRegistry() *AaqEvaluatorRegistry

func (*AaqEvaluatorRegistry) Add added in v1.1.6

func (aaqe *AaqEvaluatorRegistry) Add(aaqCalculator AaqCalculator)

func (*AaqEvaluatorRegistry) Collect added in v1.1.6

func (aaqe *AaqEvaluatorRegistry) Collect(numberOfRequestedEvaluatorsSidecars uint, timeout time.Duration) error

func (*AaqEvaluatorRegistry) Usage added in v1.1.6

func (aaqe *AaqEvaluatorRegistry) Usage(pod *corev1.Pod, podsState []*corev1.Pod) (rlToRet corev1.ResourceList, acceptedErr error)

type AaqSocketCalculator added in v1.1.6

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

func (*AaqSocketCalculator) PodUsageFunc added in v1.1.6

func (aaqsc *AaqSocketCalculator) PodUsageFunc(pod *corev1.Pod, podsState []*corev1.Pod) (corev1.ResourceList, error, bool)

type Registry added in v1.1.6

type Registry interface {
	Add(aaqCalculator AaqCalculator)
	Collect(numberOfRequestedEvaluatorsSidecars uint, timeout time.Duration) error
	Usage(*corev1.Pod, []*corev1.Pod) (corev1.ResourceList, error)
}

Jump to

Keyboard shortcuts

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