api

package
v0.0.0-...-ef77458 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyVPAContainerPolicy

func ApplyVPAContainerPolicy(resources apiv1.ResourceList, container apiv1.Container, policy *vpa_types.PodResourcePolicy)

ApplyVPAContainerPolicy enforces min/max policy on resources

func CreateOrUpdateVpaCheckpoint

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

CreateOrUpdateVpaCheckpoint updates the status field of the VPA Checkpoint API object. If object doesn't exits it is created.

func GetCappedRecommendationForContainer

func GetCappedRecommendationForContainer(
	container apiv1.Container,
	podRecommendation *vpa_types.RecommendedPodResources,
	policy *vpa_types.PodResourcePolicy) (*vpa_types.RecommendedContainerResources, error)

GetCappedRecommendationForContainer returns a recommendation extracted for the given container, adjusted to obey policy and limits.

func GetControllingVPAForPod

func GetControllingVPAForPod(pod *apiv1.Pod, vpas []*vpa_types.VerticalPodAutoscaler) *vpa_types.VerticalPodAutoscaler

GetControllingVPAForPod chooses the earliest created VPA from the input list that matches the given Pod.

func NewAllVpasLister

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

NewAllVpasLister returns VerticalPodAutoscalerLister configured to fetch all VPA objects. The method blocks until vpaLister is initially populated.

func PodMatchesVPA

func PodMatchesVPA(pod *apiv1.Pod, vpa *vpa_types.VerticalPodAutoscaler) bool

PodMatchesVPA returns true iff the VPA's selector matches the Pod and they are in the same namespace.

func UpdateVpaStatus

func UpdateVpaStatus(vpaClient vpa_api.VerticalPodAutoscalerInterface, vpa *model.Vpa) (result *vpa_types.VerticalPodAutoscaler, err error)

UpdateVpaStatus updates the status field of the VPA API object. It prevents race conditions by verifying that the lastUpdateTime of the API object and its model representation are equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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