mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
address review comments, added vpa endpoint to endpoints export list
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
a55a37b29f
commit
7158a2b291
@ -8,6 +8,7 @@ import type { DerivedKubeApiOptions, KubeApiDependencies } from "../kube-api";
|
||||
import { KubeApi } from "../kube-api";
|
||||
import type { BaseKubeObjectCondition, LabelSelector, NamespaceScopedMetadata } from "../kube-object";
|
||||
import { KubeObject } from "../kube-object";
|
||||
import type { CrossVersionObjectReference } from "./types/cross-version-object-reference";
|
||||
|
||||
export enum HpaMetricType {
|
||||
Resource = "Resource",
|
||||
@ -299,12 +300,6 @@ export type HorizontalPodAutoscalerMetricStatus =
|
||||
| OptionVarient<HpaMetricType.Pods, BaseHorizontalPodAutoscalerMetricStatus, "pods">
|
||||
| OptionVarient<HpaMetricType.ContainerResource, BaseHorizontalPodAutoscalerMetricStatus, "containerResource">;
|
||||
|
||||
export interface CrossVersionObjectReference {
|
||||
kind: string;
|
||||
name: string;
|
||||
apiVersion: string;
|
||||
}
|
||||
|
||||
export interface HorizontalPodAutoscalerSpec {
|
||||
scaleTargetRef: CrossVersionObjectReference;
|
||||
minReplicas?: number;
|
||||
|
||||
@ -44,3 +44,4 @@ export * from "./service-account.api";
|
||||
export * from "./stateful-set.api";
|
||||
export * from "./storage-class.api";
|
||||
export * from "./types";
|
||||
export * from "./vertical-pod-autoscaler.api";
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
export interface CrossVersionObjectReference {
|
||||
kind: string;
|
||||
name: string;
|
||||
apiVersion: string;
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ export * from "./aggregation-rule";
|
||||
export * from "./capabilities";
|
||||
export * from "./container";
|
||||
export * from "./container-port";
|
||||
export * from "./cross-version-object-reference";
|
||||
export * from "./env-from-source";
|
||||
export * from "./env-source";
|
||||
export * from "./env-var-key-selector";
|
||||
|
||||
@ -7,12 +7,7 @@ import type { BaseKubeObjectCondition, NamespaceScopedMetadata } from "../kube-o
|
||||
import { KubeObject } from "../kube-object";
|
||||
import type { DerivedKubeApiOptions, KubeApiDependencies } from "../kube-api";
|
||||
import { KubeApi } from "../kube-api";
|
||||
|
||||
export interface CrossVersionObjectReference {
|
||||
kind: string;
|
||||
name: string;
|
||||
apiVersion?: string;
|
||||
}
|
||||
import type { CrossVersionObjectReference } from "./types/cross-version-object-reference";
|
||||
|
||||
export enum ResourceName {
|
||||
ResourceCPU = "cpu",
|
||||
@ -52,7 +47,10 @@ export enum ControlledValues {
|
||||
ControlledValueRequestsOnly = "RequestsOnly",
|
||||
}
|
||||
|
||||
// ContainerResourcePolicy controls how autoscaler computes the recommended resources for a specific container.
|
||||
/**
|
||||
* ContainerResourcePolicy controls how autoscaler computes the recommended resources for
|
||||
* a specific container.
|
||||
*/
|
||||
export interface ContainerResourcePolicy {
|
||||
containerName?: string;
|
||||
mode?: ContainerScalingMode;
|
||||
@ -62,29 +60,41 @@ export interface ContainerResourcePolicy {
|
||||
controlledValues?: ControlledValues;
|
||||
}
|
||||
|
||||
// Controls how the autoscaler computes recommended resources.
|
||||
// The resource policy may be used to set constraints on the recommendations for individual containers.
|
||||
// If not specified, the autoscaler computes recommended resources for all containers in the pod, without additional constraints.
|
||||
/**
|
||||
* Controls how the autoscaler computes recommended resources.
|
||||
* The resource policy may be used to set constraints on the recommendations for individual
|
||||
* containers.
|
||||
* If not specified, the autoscaler computes recommended resources for all containers in the
|
||||
* pod, without additional constraints.
|
||||
*/
|
||||
export interface PodResourcePolicy {
|
||||
containerPolicies?: ContainerResourcePolicy[]; // Per-container resource policies.
|
||||
}
|
||||
|
||||
export enum UpdateMode {
|
||||
// UpdateModeOff means that autoscaler never changes Pod resources.
|
||||
// The recommender still sets the recommended resources in the
|
||||
// VerticalPodAutoscaler object. This can be used for a "dry run".
|
||||
/**
|
||||
* UpdateModeOff means that autoscaler never changes Pod resources.
|
||||
* The recommender still sets the recommended resources in the
|
||||
* VerticalPodAutoscaler object. This can be used for a "dry run".
|
||||
*/
|
||||
UpdateModeOff = "Off",
|
||||
// UpdateModeInitial means that autoscaler only assigns resources on pod
|
||||
// creation and does not change them during the lifetime of the pod.
|
||||
/**
|
||||
* UpdateModeInitial means that autoscaler only assigns resources on pod
|
||||
* creation and does not change them during the lifetime of the pod.
|
||||
*/
|
||||
UpdateModeInitial = "Initial",
|
||||
// UpdateModeRecreate means that autoscaler assigns resources on pod
|
||||
// creation and additionally can update them during the lifetime of the
|
||||
// pod by deleting and recreating the pod.
|
||||
/**
|
||||
* UpdateModeRecreate means that autoscaler assigns resources on pod
|
||||
* creation and additionally can update them during the lifetime of the
|
||||
* pod by deleting and recreating the pod.
|
||||
*/
|
||||
UpdateModeRecreate = "Recreate",
|
||||
// UpdateModeAuto means that autoscaler assigns resources on pod creation
|
||||
// and additionally can update them during the lifetime of the pod,
|
||||
// using any available update method. Currently this is equivalent to
|
||||
// Recreate, which is the only available update method.
|
||||
/**
|
||||
* UpdateModeAuto means that autoscaler assigns resources on pod creation
|
||||
* and additionally can update them during the lifetime of the pod,
|
||||
* using any available update method. Currently this is equivalent to
|
||||
* Recreate, which is the only available update method.
|
||||
*/
|
||||
UpdateModeAuto = "Auto",
|
||||
}
|
||||
export interface PodUpdatePolicy {
|
||||
|
||||
@ -8,7 +8,6 @@ import "./vpa.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||
// import type { VerticalPodAutoscaler } from "../../../common/k8s-api/endpoints/vertical-pod-autoscaler.api";
|
||||
import { Badge } from "../badge";
|
||||
import { cssNames, prevDefault } from "../../utils";
|
||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user