vpa

package
v0.0.0-...-b80888c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceHandler

func NewResourceHandler(preProcessor PreProcessor) resource.Handler

NewResourceHandler creates new instance of resourceHandler.

func ValidateVPA

func ValidateVPA(vpa *vpa_types.VerticalPodAutoscaler, isCreate bool) error

ValidateVPA checks the correctness of VPA Spec and returns an error if there is a problem.

Types

type Matcher

type Matcher interface {
	GetMatchingVPA(pod *core.Pod) *vpa_types.VerticalPodAutoscaler
}

Matcher is capable of returning a single matching VPA object for a pod. Will return nil if no matching object is found.

func NewMatcher

func NewMatcher(vpaLister vpa_lister.VerticalPodAutoscalerLister,
	selectorFetcher target.VpaTargetSelectorFetcher) Matcher

NewMatcher returns a new VPA matcher.

type PreProcessor

type PreProcessor interface {
	Process(vpa *vpa_types.VerticalPodAutoscaler, isCreate bool) (*vpa_types.VerticalPodAutoscaler, error)
}

PreProcessor processes the VPAs before applying default .

func NewDefaultPreProcessor

func NewDefaultPreProcessor() PreProcessor

NewDefaultPreProcessor creates a PreProcessor that leaves VPAs unchanged and returns no error

Jump to

Keyboard shortcuts

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