UNPKG

@kubernetes-models/autoscaler

Version:
66 lines (65 loc) 3.15 kB
import { IIoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerControlledValues } from "./ContainerControlledValues.js"; import { IIoK8sApimachineryPkgApiResourceQuantity } from "@kubernetes-models/apimachinery/api/resource/Quantity"; import { IIoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerScalingMode } from "./ContainerScalingMode.js"; import { ModelData, Model } from "@kubernetes-models/base"; /** * ContainerResourcePolicy controls how autoscaler computes the recommended * resources for a specific container. */ export interface IContainerResourcePolicy { /** * Name of the container or DefaultContainerResourcePolicy, in which * case the policy is used by the containers that don't have their own * policy specified. */ "containerName"?: string; /** * Specifies the type of recommendations that will be computed * (and possibly applied) by VPA. * If not specified, the default of [ResourceCPU, ResourceMemory] will be used. */ "controlledResources"?: Array<string>; /** * Specifies which resource values should be controlled. * The default is "RequestsAndLimits". */ "controlledValues"?: IIoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerControlledValues; "maxAllowed"?: { [key: string]: IIoK8sApimachineryPkgApiResourceQuantity; }; "minAllowed"?: { [key: string]: IIoK8sApimachineryPkgApiResourceQuantity; }; /** * Whether autoscaler is enabled for the container. The default is "Auto". */ "mode"?: IIoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerScalingMode; /** * oomBumpUpRatio is the ratio to increase memory when OOM is detected. */ "oomBumpUpRatio"?: IIoK8sApimachineryPkgApiResourceQuantity; /** * oomMinBumpUp is the minimum increase in memory when OOM is detected. */ "oomMinBumpUp"?: IIoK8sApimachineryPkgApiResourceQuantity; } /** * ContainerResourcePolicy controls how autoscaler computes the recommended * resources for a specific container. */ export declare class ContainerResourcePolicy extends Model<IContainerResourcePolicy> implements IContainerResourcePolicy { "containerName"?: string; "controlledResources"?: Array<string>; "controlledValues"?: IIoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerControlledValues; "maxAllowed"?: { [key: string]: IIoK8sApimachineryPkgApiResourceQuantity; }; "minAllowed"?: { [key: string]: IIoK8sApimachineryPkgApiResourceQuantity; }; "mode"?: IIoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerScalingMode; "oomBumpUpRatio"?: IIoK8sApimachineryPkgApiResourceQuantity; "oomMinBumpUp"?: IIoK8sApimachineryPkgApiResourceQuantity; constructor(data?: ModelData<IContainerResourcePolicy>); } export type { IContainerResourcePolicy as IIoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerResourcePolicy, ContainerResourcePolicy as IoK8sAutoscalerVerticalPodAutoscalerPkgApisAutoscalingK8sIoV1ContainerResourcePolicy };