vpa

package
v0.0.0-...-7600a38 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateVpaCheckpoint

func CreateOrUpdateVpaCheckpoint(vpaCheckpointClient vpa_api.VerticalPodAutoscalerCheckpointInterface, vpaCheckpoint *vpa_types.VerticalPodAutoscalerCheckpoint) error

func GetContainerControlledValues

func GetContainerControlledValues(name string, vpaResourcePolicy *vpa_types.PodResourcePolicy) vpa_types.ContainerControlledValues

func GetContainerResourcePolicy

func GetContainerResourcePolicy(containerName string, policy *vpa_types.PodResourcePolicy) *vpa_types.ContainerResourcePolicy

func NewVpasLister

func NewVpasLister(vpaClient *vpa_clientset.Clientset, stopChannel <-chan struct{}, namespace string) vpa_lister.VerticalPodAutoscalerLister

func UpdateVpaStatusIfNeeded

func UpdateVpaStatusIfNeeded(vpaClient vpa_api.VerticalPodAutoscalerInterface, vpaName string, newStatus,
	oldStatus *vpa_types.VerticalPodAutoscalerStatus) (result *vpa_types.VerticalPodAutoscaler, err error)

Types

type ContainerToAnnotationsMap

type ContainerToAnnotationsMap = map[string][]string

ContainerToAnnotationsMap contains annotations per container.

type RecommendationProcessor

type RecommendationProcessor interface {
	// Apply processes and updates recommendation for given pod, based on container limits,
	// VPA policy and possibly other internal RecommendationProcessor context.
	// Must return a non-nil pointer to RecommendedPodResources or error.
	Apply(podRecommendation *vpa_types.RecommendedPodResources,
		policy *vpa_types.PodResourcePolicy,
		conditions []vpa_types.VerticalPodAutoscalerCondition,
		pod *v1.Pod) (*vpa_types.RecommendedPodResources, ContainerToAnnotationsMap, error)
}

RecommendationProcessor post-processes recommendation adjusting it to limits and environment context

func NewCappingRecommendationProcessor

func NewCappingRecommendationProcessor(limitsRangeCalculator limitrange.LimitRangeCalculator) RecommendationProcessor

type VpaWithSelector

type VpaWithSelector struct {
	Vpa      *vpa_types.VerticalPodAutoscaler
	Selector labels.Selector
}

VpaWithSelector is a pair of VPA and its selector.

func GetControllingVPAForPod

func GetControllingVPAForPod(pod *core.Pod, vpas []*VpaWithSelector) *VpaWithSelector

Jump to

Keyboard shortcuts

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