kubernetes-plugin: integrate with top method from kubernetes client library (#8248)

* kubernetes-plugin: integrate with top method from kubernetes client library

Signed-off-by: mclarke <mclarke@spotify.com>

* fix existing tests

Signed-off-by: mclarke <mclarke@spotify.com>

* prettier

Signed-off-by: mclarke <mclarke@spotify.com>

* add fetcher test

Signed-off-by: mclarke <mclarke@spotify.com>

* update api report

Signed-off-by: mclarke <mclarke@spotify.com>

* fix fe tests

Signed-off-by: mclarke <mclarke@spotify.com>

* fe tests

Signed-off-by: mclarke <mclarke@spotify.com>

* changeset

Signed-off-by: mclarke <mclarke@spotify.com>

* add skip metrics lookup flag

Signed-off-by: mclarke <mclarke@spotify.com>

* add skip metrics lookup to gke locator and docs

Signed-off-by: mclarke <mclarke@spotify.com>

* fix tests

Signed-off-by: mclarke <mclarke@spotify.com>

* minor change

Signed-off-by: mclarke <mclarke@spotify.com>

* missed prettier

Signed-off-by: mclarke <mclarke@spotify.com>

* missed file

Signed-off-by: mclarke <mclarke@spotify.com>

* more details to changeset

Signed-off-by: mclarke <mclarke@spotify.com>
This commit is contained in:
Matthew Clarke
2021-12-02 23:10:48 +00:00
committed by GitHub
parent a6639021a6
commit c010632f88
42 changed files with 1005 additions and 155 deletions
+22 -2
View File
@@ -15,11 +15,11 @@
*/
import {
ExtensionsV1beta1Ingress,
V1ConfigMap,
V1CronJob,
V1Deployment,
V1HorizontalPodAutoscaler,
V1Ingress,
V1Job,
V1Pod,
V1ReplicaSet,
@@ -69,6 +69,7 @@ export interface ClusterAttributes {
export interface ClusterObjects {
cluster: ClusterAttributes;
resources: FetchResponse[];
podMetrics: ClientPodStatus[];
errors: KubernetesFetchError[];
}
@@ -132,7 +133,7 @@ export interface CronJobsFetchResponse {
export interface IngressesFetchResponse {
type: 'ingresses';
resources: Array<ExtensionsV1beta1Ingress>;
resources: Array<V1Ingress>;
}
export interface CustomResourceFetchResponse {
@@ -151,3 +152,22 @@ export type KubernetesErrorTypes =
| 'UNAUTHORIZED_ERROR'
| 'SYSTEM_ERROR'
| 'UNKNOWN_ERROR';
export interface ClientCurrentResourceUsage {
currentUsage: number | string;
requestTotal: number | string;
limitTotal: number | string;
}
export interface ClientContainerStatus {
container: string;
cpuUsage: ClientCurrentResourceUsage;
memoryUsage: ClientCurrentResourceUsage;
}
export interface ClientPodStatus {
pod: V1Pod;
cpu: ClientCurrentResourceUsage;
memory: ClientCurrentResourceUsage;
containers: ClientContainerStatus[];
}