@backstage/plugin-kubernetes-common 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/index.d.ts +29 -4
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-common
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c010632f88: Add pod metrics lookup and display in pod table.
|
|
8
|
+
|
|
9
|
+
## Backwards incompatible changes
|
|
10
|
+
|
|
11
|
+
If your Kubernetes distribution does not have the [metrics server](https://github.com/kubernetes-sigs/metrics-server) installed,
|
|
12
|
+
you will need to set the `skipMetricsLookup` config flag to `false`.
|
|
13
|
+
|
|
14
|
+
See the [configuration docs](https://backstage.io/docs/features/kubernetes/configuration) for more details.
|
|
15
|
+
|
|
16
|
+
## 0.1.7
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 59677fadb1: Improvements to API Reference documentation
|
|
21
|
+
|
|
22
|
+
## 0.1.6
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 37dc844728: Include CronJobs and Jobs as default objects returned by the kubernetes backend and add/update relevant types.
|
|
27
|
+
|
|
28
|
+
## 0.1.5
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 193a999a80: Fixed incorrect keyword, repository directory path and entrypoints in `package.json`.
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @backstage/catalog-model@0.9.4
|
|
35
|
+
|
|
3
36
|
## 0.1.4
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V1Pod, V1Service, V1ConfigMap, V1Deployment, V1ReplicaSet, V1HorizontalPodAutoscaler,
|
|
1
|
+
import { V1Pod, V1Service, V1ConfigMap, V1Deployment, V1ReplicaSet, V1HorizontalPodAutoscaler, V1Job, V1CronJob, V1Ingress } from '@kubernetes/client-node';
|
|
2
2
|
import { Entity } from '@backstage/catalog-model';
|
|
3
3
|
|
|
4
4
|
interface KubernetesRequestBody {
|
|
@@ -41,13 +41,14 @@ interface ClusterAttributes {
|
|
|
41
41
|
interface ClusterObjects {
|
|
42
42
|
cluster: ClusterAttributes;
|
|
43
43
|
resources: FetchResponse[];
|
|
44
|
+
podMetrics: ClientPodStatus[];
|
|
44
45
|
errors: KubernetesFetchError[];
|
|
45
46
|
}
|
|
46
47
|
interface ObjectsByEntityResponse {
|
|
47
48
|
items: ClusterObjects[];
|
|
48
49
|
}
|
|
49
50
|
declare type AuthProviderType = 'google' | 'serviceAccount' | 'aws';
|
|
50
|
-
declare type FetchResponse = PodFetchResponse | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | IngressesFetchResponse | CustomResourceFetchResponse;
|
|
51
|
+
declare type FetchResponse = PodFetchResponse | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | JobsFetchResponse | CronJobsFetchResponse | IngressesFetchResponse | CustomResourceFetchResponse;
|
|
51
52
|
interface PodFetchResponse {
|
|
52
53
|
type: 'pods';
|
|
53
54
|
resources: Array<V1Pod>;
|
|
@@ -72,9 +73,17 @@ interface HorizontalPodAutoscalersFetchResponse {
|
|
|
72
73
|
type: 'horizontalpodautoscalers';
|
|
73
74
|
resources: Array<V1HorizontalPodAutoscaler>;
|
|
74
75
|
}
|
|
76
|
+
interface JobsFetchResponse {
|
|
77
|
+
type: 'jobs';
|
|
78
|
+
resources: Array<V1Job>;
|
|
79
|
+
}
|
|
80
|
+
interface CronJobsFetchResponse {
|
|
81
|
+
type: 'cronjobs';
|
|
82
|
+
resources: Array<V1CronJob>;
|
|
83
|
+
}
|
|
75
84
|
interface IngressesFetchResponse {
|
|
76
85
|
type: 'ingresses';
|
|
77
|
-
resources: Array<
|
|
86
|
+
resources: Array<V1Ingress>;
|
|
78
87
|
}
|
|
79
88
|
interface CustomResourceFetchResponse {
|
|
80
89
|
type: 'customresources';
|
|
@@ -86,5 +95,21 @@ interface KubernetesFetchError {
|
|
|
86
95
|
resourcePath?: string;
|
|
87
96
|
}
|
|
88
97
|
declare type KubernetesErrorTypes = 'BAD_REQUEST' | 'UNAUTHORIZED_ERROR' | 'SYSTEM_ERROR' | 'UNKNOWN_ERROR';
|
|
98
|
+
interface ClientCurrentResourceUsage {
|
|
99
|
+
currentUsage: number | string;
|
|
100
|
+
requestTotal: number | string;
|
|
101
|
+
limitTotal: number | string;
|
|
102
|
+
}
|
|
103
|
+
interface ClientContainerStatus {
|
|
104
|
+
container: string;
|
|
105
|
+
cpuUsage: ClientCurrentResourceUsage;
|
|
106
|
+
memoryUsage: ClientCurrentResourceUsage;
|
|
107
|
+
}
|
|
108
|
+
interface ClientPodStatus {
|
|
109
|
+
pod: V1Pod;
|
|
110
|
+
cpu: ClientCurrentResourceUsage;
|
|
111
|
+
memory: ClientCurrentResourceUsage;
|
|
112
|
+
containers: ClientContainerStatus[];
|
|
113
|
+
}
|
|
89
114
|
|
|
90
|
-
export { AuthProviderType, ClusterAttributes, ClusterObjects, ConfigMapFetchResponse, CustomResourceFetchResponse, DeploymentFetchResponse, FetchResponse, HorizontalPodAutoscalersFetchResponse, IngressesFetchResponse, KubernetesErrorTypes, KubernetesFetchError, KubernetesRequestBody, ObjectsByEntityResponse, PodFetchResponse, ReplicaSetsFetchResponse, ServiceFetchResponse };
|
|
115
|
+
export { AuthProviderType, ClientContainerStatus, ClientCurrentResourceUsage, ClientPodStatus, ClusterAttributes, ClusterObjects, ConfigMapFetchResponse, CronJobsFetchResponse, CustomResourceFetchResponse, DeploymentFetchResponse, FetchResponse, HorizontalPodAutoscalersFetchResponse, IngressesFetchResponse, JobsFetchResponse, KubernetesErrorTypes, KubernetesFetchError, KubernetesRequestBody, ObjectsByEntityResponse, PodFetchResponse, ReplicaSetsFetchResponse, ServiceFetchResponse };
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-kubernetes-common",
|
|
3
3
|
"description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"main": "dist/index.
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public",
|
|
10
|
-
"main": "dist/index.
|
|
10
|
+
"main": "dist/index.cjs.js",
|
|
11
|
+
"module": "dist/index.esm.js",
|
|
11
12
|
"types": "dist/index.d.ts"
|
|
12
13
|
},
|
|
13
14
|
"homepage": "https://backstage.io",
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
16
17
|
"url": "https://github.com/backstage/backstage",
|
|
17
|
-
"directory": "
|
|
18
|
+
"directory": "plugins/kubernetes-common"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [
|
|
20
|
-
"techdocs",
|
|
21
21
|
"kubernetes"
|
|
22
22
|
],
|
|
23
23
|
"files": [
|
|
@@ -35,16 +35,17 @@
|
|
|
35
35
|
"url": "https://github.com/backstage/backstage/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@backstage/catalog-model": "^0.9.
|
|
39
|
-
"@kubernetes/client-node": "^0.
|
|
38
|
+
"@backstage/catalog-model": "^0.9.7",
|
|
39
|
+
"@kubernetes/client-node": "^0.16.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@backstage/cli": "^0.
|
|
42
|
+
"@backstage/cli": "^0.10.1"
|
|
43
43
|
},
|
|
44
44
|
"jest": {
|
|
45
45
|
"roots": [
|
|
46
46
|
".."
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "562be0b43016294e27af3ad024191bb86b13b1c1",
|
|
50
|
+
"module": "dist/index.esm.js"
|
|
50
51
|
}
|