vpa

package
v1.99.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ManagedResourceControlName is the name of the vpa managed resource for seeds.
	ManagedResourceControlName = "vpa"
)

Variables

View Source
var TimeoutWaitForManagedResource = 2 * time.Minute

TimeoutWaitForManagedResource is the timeout used while waiting for the ManagedResources to become healthy or deleted.

Functions

func CentralLoggingConfiguration

func CentralLoggingConfiguration() (component.CentralLoggingConfig, error)

CentralLoggingConfiguration returns a fluent-bit parser and filter for the VPA logs.

func NewCRD

func NewCRD(applier kubernetes.Applier, registry *managedresources.Registry) component.Deployer

NewCRD can be used to deploy the CRD definitions for the Kubernetes Vertical Pod Autoscaler.

Types

type Interface

type Interface interface {
	component.DeployWaiter

	// GetValues returns the current configuration values of the deployer.
	GetValues() Values
}

Interface contains functions for a VPA deployer.

func New

func New(
	client client.Client,
	namespace string,
	secretsManager secretsmanager.Interface,
	values Values,
) Interface

New creates a new instance of DeployWaiter for the Kubernetes Vertical Pod Autoscaler.

type Values

type Values struct {
	// ClusterType specifies the type of the cluster to which VPA is being deployed.
	// For seeds, all resources are being deployed as part of a ManagedResource (except for the CRDs - those must be
	// deployed separately because the VPA components themselves create VPA resources, hence the CRD must exist
	// beforehand).
	// For shoots, the VPA runs in the shoot namespace in the seed as part of the control plane. Hence, only the runtime
	// resources (like Deployment, Service, etc.) are being deployed directly (with the client). All other application-
	// related resources (like RBAC roles, CRD, etc.) are deployed as part of a ManagedResource.
	ClusterType component.ClusterType
	// Enabled specifies if VPA is enabled.
	Enabled bool
	// SecretNameServerCA is the name of the server CA secret.
	SecretNameServerCA string
	// RuntimeKubernetesVersion is the Kubernetes version of the runtime cluster.
	RuntimeKubernetesVersion *semver.Version

	// AdmissionController is a set of configuration values for the vpa-admission-controller.
	AdmissionController ValuesAdmissionController
	// Recommender is a set of configuration values for the vpa-recommender.
	Recommender ValuesRecommender
	// Updater is a set of configuration values for the vpa-updater.
	Updater ValuesUpdater
}

Values is a set of configuration values for the VPA components.

type ValuesAdmissionController

type ValuesAdmissionController struct {
	// Image is the container image.
	Image string
	// PriorityClassName is the name of the priority class.
	PriorityClassName string
	// Replicas is the number of pod replicas.
	Replicas *int32
	// TopologyAwareRoutingEnabled indicates whether topology-aware routing is enabled for the vpa-webhoook service.
	// This value is only applicable for the vpa-admission-controller that is deployed in the Shoot control plane (when ClusterType=shoot).
	TopologyAwareRoutingEnabled bool
}

ValuesAdmissionController is a set of configuration values for the vpa-admission-controller.

type ValuesRecommender

type ValuesRecommender struct {
	// RecommendationMarginFraction is the fraction of usage added as the safety margin to the recommended request.
	RecommendationMarginFraction *float64
	// TargetCPUPercentile is the CPU usage percentile that will be used as a base for CPU target recommendation.
	// Doesn't affect CPU lower bound, CPU upper bound nor memory recommendations.
	TargetCPUPercentile *float64
	// Image is the container image.
	Image string
	// Interval is the interval how often the recommender should run.
	Interval *metav1.Duration
	// PriorityClassName is the name of the priority class.
	PriorityClassName string
	// Replicas is the number of pod replicas.
	Replicas *int32
}

ValuesRecommender is a set of configuration values for the vpa-recommender.

type ValuesUpdater

type ValuesUpdater struct {
	// EvictAfterOOMThreshold defines the threshold that will lead to pod eviction in case it OOMed in less than the given
	// threshold since its start and if it has only one container.
	EvictAfterOOMThreshold *metav1.Duration
	// EvictionRateBurst defines the burst of pods that can be evicted.
	EvictionRateBurst *int32
	// EvictionRateLimit defines the number of pods that can be evicted per second. A rate limit set to 0 or -1 will
	// disable the rate limiter.
	EvictionRateLimit *float64
	// EvictionTolerance defines the fraction of replica count that can be evicted for update in case more than one
	// pod can be evicted.
	EvictionTolerance *float64
	// Image is the container image.
	Image string
	// Interval is the interval how often the updater should run.
	Interval *metav1.Duration
	// PriorityClassName is the name of the priority class.
	PriorityClassName string
	// Replicas is the number of pod replicas.
	Replicas *int32
}

ValuesUpdater is a set of configuration values for the vpa-updater.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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