@backstage/plugin-kubernetes-common 0.4.1 → 0.4.2-next.1
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 +13 -0
- package/dist/index.d.ts +25 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-common
|
|
2
2
|
|
|
3
|
+
## 0.4.2-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/catalog-model@1.1.1-next.0
|
|
9
|
+
|
|
10
|
+
## 0.4.2-next.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- d669d89206: Minor API signatures cleanup
|
|
15
|
+
|
|
3
16
|
## 0.4.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -2,16 +2,19 @@ import { JsonObject } from '@backstage/types';
|
|
|
2
2
|
import { V1Pod, V1Service, V1ConfigMap, V1Deployment, V1ReplicaSet, V1LimitRange, V1HorizontalPodAutoscaler, V1Job, V1CronJob, V1Ingress, V1StatefulSet, V1DaemonSet } from '@kubernetes/client-node';
|
|
3
3
|
import { Entity } from '@backstage/catalog-model';
|
|
4
4
|
|
|
5
|
+
/** @public */
|
|
5
6
|
interface KubernetesRequestAuth {
|
|
6
7
|
google?: string;
|
|
7
8
|
oidc?: {
|
|
8
9
|
[key: string]: string;
|
|
9
10
|
};
|
|
10
11
|
}
|
|
12
|
+
/** @public */
|
|
11
13
|
interface KubernetesRequestBody {
|
|
12
14
|
auth?: KubernetesRequestAuth;
|
|
13
15
|
entity: Entity;
|
|
14
16
|
}
|
|
17
|
+
/** @public */
|
|
15
18
|
interface ClusterAttributes {
|
|
16
19
|
/**
|
|
17
20
|
* Specifies the name of the Kubernetes cluster.
|
|
@@ -49,85 +52,107 @@ interface ClusterAttributes {
|
|
|
49
52
|
*/
|
|
50
53
|
dashboardParameters?: JsonObject;
|
|
51
54
|
}
|
|
55
|
+
/** @public */
|
|
52
56
|
interface ClusterObjects {
|
|
53
57
|
cluster: ClusterAttributes;
|
|
54
58
|
resources: FetchResponse[];
|
|
55
59
|
podMetrics: ClientPodStatus[];
|
|
56
60
|
errors: KubernetesFetchError[];
|
|
57
61
|
}
|
|
62
|
+
/** @public */
|
|
58
63
|
interface ObjectsByEntityResponse {
|
|
59
64
|
items: ClusterObjects[];
|
|
60
65
|
}
|
|
66
|
+
/** @public */
|
|
61
67
|
declare type AuthProviderType = 'google' | 'serviceAccount' | 'aws' | 'azure';
|
|
68
|
+
/** @public */
|
|
62
69
|
declare type FetchResponse = PodFetchResponse | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse | LimitRangeFetchReponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | JobsFetchResponse | CronJobsFetchResponse | IngressesFetchResponse | CustomResourceFetchResponse | StatefulSetsFetchResponse | DaemonSetsFetchResponse;
|
|
70
|
+
/** @public */
|
|
63
71
|
interface PodFetchResponse {
|
|
64
72
|
type: 'pods';
|
|
65
73
|
resources: Array<V1Pod>;
|
|
66
74
|
}
|
|
75
|
+
/** @public */
|
|
67
76
|
interface ServiceFetchResponse {
|
|
68
77
|
type: 'services';
|
|
69
78
|
resources: Array<V1Service>;
|
|
70
79
|
}
|
|
80
|
+
/** @public */
|
|
71
81
|
interface ConfigMapFetchResponse {
|
|
72
82
|
type: 'configmaps';
|
|
73
83
|
resources: Array<V1ConfigMap>;
|
|
74
84
|
}
|
|
85
|
+
/** @public */
|
|
75
86
|
interface DeploymentFetchResponse {
|
|
76
87
|
type: 'deployments';
|
|
77
88
|
resources: Array<V1Deployment>;
|
|
78
89
|
}
|
|
90
|
+
/** @public */
|
|
79
91
|
interface ReplicaSetsFetchResponse {
|
|
80
92
|
type: 'replicasets';
|
|
81
93
|
resources: Array<V1ReplicaSet>;
|
|
82
94
|
}
|
|
95
|
+
/** @public */
|
|
83
96
|
interface LimitRangeFetchReponse {
|
|
84
97
|
type: 'limitranges';
|
|
85
98
|
resources: Array<V1LimitRange>;
|
|
86
99
|
}
|
|
100
|
+
/** @public */
|
|
87
101
|
interface HorizontalPodAutoscalersFetchResponse {
|
|
88
102
|
type: 'horizontalpodautoscalers';
|
|
89
103
|
resources: Array<V1HorizontalPodAutoscaler>;
|
|
90
104
|
}
|
|
105
|
+
/** @public */
|
|
91
106
|
interface JobsFetchResponse {
|
|
92
107
|
type: 'jobs';
|
|
93
108
|
resources: Array<V1Job>;
|
|
94
109
|
}
|
|
110
|
+
/** @public */
|
|
95
111
|
interface CronJobsFetchResponse {
|
|
96
112
|
type: 'cronjobs';
|
|
97
113
|
resources: Array<V1CronJob>;
|
|
98
114
|
}
|
|
115
|
+
/** @public */
|
|
99
116
|
interface IngressesFetchResponse {
|
|
100
117
|
type: 'ingresses';
|
|
101
118
|
resources: Array<V1Ingress>;
|
|
102
119
|
}
|
|
120
|
+
/** @public */
|
|
103
121
|
interface CustomResourceFetchResponse {
|
|
104
122
|
type: 'customresources';
|
|
105
123
|
resources: Array<any>;
|
|
106
124
|
}
|
|
125
|
+
/** @public */
|
|
107
126
|
interface StatefulSetsFetchResponse {
|
|
108
127
|
type: 'statefulsets';
|
|
109
128
|
resources: Array<V1StatefulSet>;
|
|
110
129
|
}
|
|
130
|
+
/** @public */
|
|
111
131
|
interface DaemonSetsFetchResponse {
|
|
112
132
|
type: 'daemonsets';
|
|
113
133
|
resources: Array<V1DaemonSet>;
|
|
114
134
|
}
|
|
135
|
+
/** @public */
|
|
115
136
|
interface KubernetesFetchError {
|
|
116
137
|
errorType: KubernetesErrorTypes;
|
|
117
138
|
statusCode?: number;
|
|
118
139
|
resourcePath?: string;
|
|
119
140
|
}
|
|
141
|
+
/** @public */
|
|
120
142
|
declare type KubernetesErrorTypes = 'BAD_REQUEST' | 'UNAUTHORIZED_ERROR' | 'SYSTEM_ERROR' | 'UNKNOWN_ERROR';
|
|
143
|
+
/** @public */
|
|
121
144
|
interface ClientCurrentResourceUsage {
|
|
122
145
|
currentUsage: number | string;
|
|
123
146
|
requestTotal: number | string;
|
|
124
147
|
limitTotal: number | string;
|
|
125
148
|
}
|
|
149
|
+
/** @public */
|
|
126
150
|
interface ClientContainerStatus {
|
|
127
151
|
container: string;
|
|
128
152
|
cpuUsage: ClientCurrentResourceUsage;
|
|
129
153
|
memoryUsage: ClientCurrentResourceUsage;
|
|
130
154
|
}
|
|
155
|
+
/** @public */
|
|
131
156
|
interface ClientPodStatus {
|
|
132
157
|
pod: V1Pod;
|
|
133
158
|
cpu: ClientCurrentResourceUsage;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.4.1",
|
|
4
|
+
"version": "0.4.2-next.1",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"url": "https://github.com/backstage/backstage/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@backstage/catalog-model": "^1.1.0",
|
|
41
|
+
"@backstage/catalog-model": "^1.1.1-next.0",
|
|
42
42
|
"@kubernetes/client-node": "^0.17.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@backstage/cli": "^0.
|
|
45
|
+
"@backstage/cli": "^0.19.0-next.3"
|
|
46
46
|
},
|
|
47
47
|
"jest": {
|
|
48
48
|
"roots": [
|
|
49
49
|
".."
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "2f458448f850dc68a711e2f31d14a91f96cf175d",
|
|
53
53
|
"module": "dist/index.esm.js"
|
|
54
54
|
}
|