1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add HPA Behavior types from v2

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-01-11 10:58:53 +03:00
parent e872248c23
commit 9a73940ae6

View File

@ -72,6 +72,27 @@ export type HorizontalPodAutoscalerMetricSpec =
| OptionVarient<HpaMetricType.Pods, BaseHorizontalPodAutoscalerMetricSpec, "pods">
| OptionVarient<HpaMetricType.ContainerResource, BaseHorizontalPodAutoscalerMetricSpec, "containerResource">;
type HorizontalPodAutoscalerBehavior = {
scaleUp?: HPAScalingRules,
scaleDown?: HPAScalingRules,
}
type HPAScalingRules = {
stabilizationWindowSecond?: number,
selectPolicy?: ScalingPolicySelect,
policies?: HPAScalingPolicy[],
}
type ScalingPolicySelect = string
type HPAScalingPolicy = {
type: HPAScalingPolicyType,
value: number,
periodSeconds: number
}
type HPAScalingPolicyType = string
export interface ContainerResourceMetricStatus {
container: string;
currentAverageUtilization?: number;
@ -132,6 +153,7 @@ export interface HorizontalPodAutoscalerSpec {
minReplicas?: number;
maxReplicas: number;
metrics?: HorizontalPodAutoscalerMetricSpec[];
behavior?: HorizontalPodAutoscalerBehavior;
}
export interface HorizontalPodAutoscalerStatus {