Documentation ¶
Index ¶
Constants ¶
View Source
const ( MinCpuResource = 100 MinMemoryResource = 256 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalResourceEstimator ¶
func NewExternalResourceEstimator ¶
func NewExternalResourceEstimator(spec autoscalingapi.ResourceEstimator) *ExternalResourceEstimator
func (*ExternalResourceEstimator) DeleteEstimation ¶
func (e *ExternalResourceEstimator) DeleteEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler)
func (*ExternalResourceEstimator) GetResourceEstimation ¶
func (e *ExternalResourceEstimator) GetResourceEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler, config map[string]string, containerName string, currRes *corev1.ResourceRequirements) (corev1.ResourceList, error)
type OOMResourceEstimator ¶
func (*OOMResourceEstimator) DeleteEstimation ¶
func (e *OOMResourceEstimator) DeleteEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler)
func (*OOMResourceEstimator) GetResourceEstimation ¶
func (e *OOMResourceEstimator) GetResourceEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler, config map[string]string, containerName string, currRes *corev1.ResourceRequirements) (corev1.ResourceList, error)
type PercentileResourceEstimator ¶ added in v0.4.0
type PercentileResourceEstimator struct { Predictor prediction.Interface Client client.Client TargetFetcher target.SelectorFetcher }
func (*PercentileResourceEstimator) DeleteEstimation ¶ added in v0.4.0
func (e *PercentileResourceEstimator) DeleteEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler)
func (*PercentileResourceEstimator) GetResourceEstimation ¶ added in v0.4.0
func (e *PercentileResourceEstimator) GetResourceEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler, config map[string]string, containerName string, currRes *corev1.ResourceRequirements) (corev1.ResourceList, error)
type ProportionalResourceEstimator ¶
func (*ProportionalResourceEstimator) DeleteEstimation ¶
func (e *ProportionalResourceEstimator) DeleteEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler)
func (*ProportionalResourceEstimator) GetResourceEstimation ¶
func (e *ProportionalResourceEstimator) GetResourceEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler, config map[string]string, containerName string, currRes *corev1.ResourceRequirements) (corev1.ResourceList, error)
type ResourceEstimator ¶
type ResourceEstimator interface { // GetResourceEstimation get estimated resource result for an EffectiveVPA and related configs GetResourceEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler, config map[string]string, containerName string, currRes *corev1.ResourceRequirements) (corev1.ResourceList, error) // DeleteEstimation delete related resource from an EffectiveVPA DeleteEstimation(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler) }
ResourceEstimator defines the implement for build-in estimator
type ResourceEstimatorInstance ¶
type ResourceEstimatorInstance interface { ResourceEstimator // GetSpec return the spec for this instance GetSpec() autoscalingapi.ResourceEstimator }
ResourceEstimatorInstance is the instance that used for container scaling
type ResourceEstimatorManager ¶
type ResourceEstimatorManager interface { // GetEstimators get estimator instances based on EffectiveVPA spec GetEstimators(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler) []ResourceEstimatorInstance // DeleteEstimators release estimator resources based on EffectiveVPA spec DeleteEstimators(evpa *autoscalingapi.EffectiveVerticalPodAutoscaler) }
ResourceEstimatorManager controls how to get or delete estimators for EffectiveVPA
func NewResourceEstimatorManager ¶
func NewResourceEstimatorManager(client client.Client, fetcher target.SelectorFetcher, oomRecorder oom.Recorder, predictor prediction.Interface) ResourceEstimatorManager
Click to show internal directories.
Click to hide internal directories.