import { Container, ContainerResources, ElasticityStrategy, SloCompliance, SloTarget, VerticalElasticityStrategyConfig } from '../../../../../model'; import { OrchestratorClient } from '../../../../../orchestrator'; import { PolarisRuntime } from '../../../../../runtime'; import { StabilizationWindowTracker } from '../../../common'; import { SloComplianceElasticityStrategyControllerBase } from './slo-compliance-elasticity-strategy-controller.base'; /** * Common superclass for controller for executing an elasticity strategy that employs vertical scaling. */ export declare abstract class VerticalElasticityStrategyControllerBase extends SloComplianceElasticityStrategyControllerBase { /** The client for accessing orchestrator resources. */ protected orchClient: OrchestratorClient; /** The `PolarisRuntime` instance. */ protected polarisRuntime: PolarisRuntime; /** Tracks the stabilization windows of the ElasticityStrategy instances. */ protected stabilizationWindowTracker: StabilizationWindowTracker>; private evictionInterval; constructor(polarisRuntime: PolarisRuntime); /** * Computes the new resources for the specified `container` using the configuration from the `elasticityStrategy` instance. * * The resource numbers calculated by this method will be normalized by `VerticalElasticityStrategyControllerBase` * to fit into the limits defined by the `elasticityStrategy` instance. * * @param elasticityStrategy The current elasticity strategy instance. * @param container The container, for which to compute the resources. * @returns A promise that resolves to the new resources that should be configured for the container. */ abstract computeResources(elasticityStrategy: ElasticityStrategy, container: Container): Promise; execute(elasticityStrategy: ElasticityStrategy): Promise; onElasticityStrategyDeleted?(elasticityStrategy: ElasticityStrategy): void; onDestroy?(): void; /** * @returns `config.scaleUpPercent` or, if it is not set, its default value. */ protected getScaleUpPercentOrDefault(config: VerticalElasticityStrategyConfig): number; /** * @returns `config.scaleDownPercent` or, if it is not set, its default value. */ protected getScaleDownPercentOrDefault(config: VerticalElasticityStrategyConfig): number; private loadTarget; private normalizeResources; /** * @returns `true` if the upcoming scaling action is outside of the stabilization window of the `elasticityStrategy`. */ private checkIfOutsideStabilizationWindow; }