@backstage/plugin-kubernetes 0.7.2-next.3 → 0.7.2
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 +20 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.esm.js +14 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 817f3196f6: Updated React Router dependencies to be peer dependencies.
|
|
8
|
+
- 7d47def9c4: Removed dependency on `@types/jest`.
|
|
9
|
+
- 0768d6dece: add new kubernetes backend endpoints to kubernetes backend client
|
|
10
|
+
- 19a27929fb: Reset error state on success
|
|
11
|
+
- 667d917488: Updated dependency `msw` to `^0.47.0`.
|
|
12
|
+
- 87ec2ba4d6: Updated dependency `msw` to `^0.46.0`.
|
|
13
|
+
- bf5e9030eb: Updated dependency `msw` to `^0.45.0`.
|
|
14
|
+
- ef9ab322de: Minor API signatures cleanup
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/core-components@0.11.1
|
|
17
|
+
- @backstage/core-plugin-api@1.0.6
|
|
18
|
+
- @backstage/plugin-catalog-react@1.1.4
|
|
19
|
+
- @backstage/catalog-model@1.1.1
|
|
20
|
+
- @backstage/config@1.0.2
|
|
21
|
+
- @backstage/plugin-kubernetes-common@0.4.2
|
|
22
|
+
|
|
3
23
|
## 0.7.2-next.3
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
3
|
import { DiscoveryApi, IdentityApi, OAuthApi, OpenIdConnectApi } from '@backstage/core-plugin-api';
|
|
4
4
|
import { Entity } from '@backstage/catalog-model';
|
|
5
|
-
import { KubernetesRequestBody, ObjectsByEntityResponse, ClusterObjects, ClientPodStatus, ClusterAttributes } from '@backstage/plugin-kubernetes-common';
|
|
5
|
+
import { KubernetesRequestBody, ObjectsByEntityResponse, WorkloadsByEntityRequest, CustomObjectsByEntityRequest, ClusterObjects, ClientPodStatus, ClusterAttributes } from '@backstage/plugin-kubernetes-common';
|
|
6
6
|
import { JsonObject } from '@backstage/types';
|
|
7
7
|
import { V1Pod, V1ReplicaSet, V1Deployment, V1HorizontalPodAutoscaler, V1Service, V1ConfigMap, V1Ingress, V1Job, V1CronJob, V1StatefulSet, V1ObjectMeta } from '@kubernetes/client-node';
|
|
8
8
|
import React from 'react';
|
|
@@ -36,6 +36,8 @@ interface KubernetesApi {
|
|
|
36
36
|
authProvider: string;
|
|
37
37
|
oidcTokenProvider?: string | undefined;
|
|
38
38
|
}[]>;
|
|
39
|
+
getWorkloadsByEntity(request: WorkloadsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
40
|
+
getCustomObjectsByEntity(request: CustomObjectsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
declare class KubernetesBackendClient implements KubernetesApi {
|
|
@@ -48,6 +50,8 @@ declare class KubernetesBackendClient implements KubernetesApi {
|
|
|
48
50
|
private handleResponse;
|
|
49
51
|
private postRequired;
|
|
50
52
|
getObjectsByEntity(requestBody: KubernetesRequestBody): Promise<ObjectsByEntityResponse>;
|
|
53
|
+
getWorkloadsByEntity(request: WorkloadsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
54
|
+
getCustomObjectsByEntity(request: CustomObjectsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
51
55
|
getClusters(): Promise<{
|
|
52
56
|
name: string;
|
|
53
57
|
authProvider: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { stringifyEntityRef } from '@backstage/catalog-model';
|
|
1
2
|
import { createApiRef, createRouteRef, createPlugin, createApiFactory, discoveryApiRef, identityApiRef, googleAuthApiRef, microsoftAuthApiRef, oktaAuthApiRef, oneloginAuthApiRef, createRoutableExtension, useApi } from '@backstage/core-plugin-api';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import React__default, { Fragment, useState, useEffect, useContext } from 'react';
|
|
@@ -57,6 +58,19 @@ class KubernetesBackendClient {
|
|
|
57
58
|
requestBody
|
|
58
59
|
);
|
|
59
60
|
}
|
|
61
|
+
async getWorkloadsByEntity(request) {
|
|
62
|
+
return await this.postRequired("/resources/workloads/query", {
|
|
63
|
+
auth: request.auth,
|
|
64
|
+
entityRef: stringifyEntityRef(request.entity)
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
async getCustomObjectsByEntity(request) {
|
|
68
|
+
return await this.postRequired(`/resources/custom/query`, {
|
|
69
|
+
entityRef: stringifyEntityRef(request.entity),
|
|
70
|
+
auth: request.auth,
|
|
71
|
+
customResources: request.customResources
|
|
72
|
+
});
|
|
73
|
+
}
|
|
60
74
|
async getClusters() {
|
|
61
75
|
const { token: idToken } = await this.identityApi.getCredentials();
|
|
62
76
|
const url = `${await this.discoveryApi.getBaseUrl("kubernetes")}/clusters`;
|