vpa

package
v1.56.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 33 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 added in v1.45.0

func CentralLoggingConfiguration() (component.CentralLoggingConfig, error)

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

func CentralMonitoringConfiguration added in v1.51.0

func CentralMonitoringConfiguration() (component.CentralMonitoringConfig, error)

CentralMonitoringConfiguration returns scrape configs for the central Prometheus.

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 added in v1.51.0

type Interface interface {
	component.DeployWaiter
	component.MonitoringComponent
}

Interface contains functions for a VPA deployer.

func New added in v1.45.0

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 added in v1.45.0

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. If VPA is not enabled and the cluster type is "seed", only vpa-exporter
	// is deployed.
	Enabled bool
	// SecretNameServerCA is the name of the server CA secret.
	SecretNameServerCA string

	// AdmissionController is a set of configuration values for the vpa-admission-controller.
	AdmissionController ValuesAdmissionController
	// Exporter is a set of configuration values for the vpa-exporter.
	Exporter ValuesExporter
	// 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 added in v1.45.0

type ValuesAdmissionController struct {
	// Image is the container image.
	Image string
	// Replicas is the number of pod replicas.
	Replicas int32
}

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

type ValuesExporter added in v1.45.0

type ValuesExporter struct {
	// Image is the container image.
	Image string
}

ValuesExporter is a set of configuration values for the vpa-exporter.

type ValuesRecommender added in v1.45.0

type ValuesRecommender struct {
	// RecommendationMarginFraction is the fraction of usage added as the safety margin to the recommended request.
	RecommendationMarginFraction *float64
	// Image is the container image.
	Image string
	// Interval is the interval how often the recommender should run.
	Interval *metav1.Duration
	// Replicas is the number of pod replicas.
	Replicas int32
}

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

type ValuesUpdater added in v1.45.0

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
	// 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