@backstage/plugin-kubernetes-common 0.1.3 → 0.1.7
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 +28 -0
- package/dist/index.d.ts +43 -6
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-common
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 59677fadb1: Improvements to API Reference documentation
|
|
8
|
+
|
|
9
|
+
## 0.1.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 37dc844728: Include CronJobs and Jobs as default objects returned by the kubernetes backend and add/update relevant types.
|
|
14
|
+
|
|
15
|
+
## 0.1.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 193a999a80: Fixed incorrect keyword, repository directory path and entrypoints in `package.json`.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @backstage/catalog-model@0.9.4
|
|
22
|
+
|
|
23
|
+
## 0.1.4
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 7a0c334707: Provide access to the Kubernetes dashboard when viewing a specific resource
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- @backstage/catalog-model@0.9.3
|
|
30
|
+
|
|
3
31
|
## 0.1.3
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V1Pod, V1Service, V1ConfigMap, V1Deployment, V1ReplicaSet, V1HorizontalPodAutoscaler, ExtensionsV1beta1Ingress } from '@kubernetes/client-node';
|
|
1
|
+
import { V1Pod, V1Service, V1ConfigMap, V1Deployment, V1ReplicaSet, V1HorizontalPodAutoscaler, V1Job, V1CronJob, ExtensionsV1beta1Ingress } from '@kubernetes/client-node';
|
|
2
2
|
import { Entity } from '@backstage/catalog-model';
|
|
3
3
|
|
|
4
4
|
interface KubernetesRequestBody {
|
|
@@ -7,10 +7,39 @@ interface KubernetesRequestBody {
|
|
|
7
7
|
};
|
|
8
8
|
entity: Entity;
|
|
9
9
|
}
|
|
10
|
+
interface ClusterAttributes {
|
|
11
|
+
/**
|
|
12
|
+
* Specifies the name of the Kubernetes cluster.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* Specifies the link to the Kubernetes dashboard managing this cluster.
|
|
17
|
+
* @remarks
|
|
18
|
+
* Note that you should specify the app used for the dashboard
|
|
19
|
+
* using the dashboardApp property, in order to properly format
|
|
20
|
+
* links to kubernetes resources, otherwise it will assume that you're running the standard one.
|
|
21
|
+
* @see dashboardApp
|
|
22
|
+
*/
|
|
23
|
+
dashboardUrl?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the app that provides the Kubernetes dashboard.
|
|
26
|
+
* This will be used for formatting links to kubernetes objects inside the dashboard.
|
|
27
|
+
* @remarks
|
|
28
|
+
* The supported dashboards are: standard, rancher, openshift, gke, aks, eks
|
|
29
|
+
* Note that it will default to the regular dashboard provided by the Kubernetes project (standard).
|
|
30
|
+
* Note that you can add your own formatter by registering it to the clusterLinksFormatters dictionary.
|
|
31
|
+
* @defaultValue standard
|
|
32
|
+
* @see dashboardUrl
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* import { clusterLinksFormatters } from '@backstage/plugin-kubernetes';
|
|
36
|
+
* clusterLinksFormatters.myDashboard = (options) => ...;
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
dashboardApp?: string;
|
|
40
|
+
}
|
|
10
41
|
interface ClusterObjects {
|
|
11
|
-
cluster:
|
|
12
|
-
name: string;
|
|
13
|
-
};
|
|
42
|
+
cluster: ClusterAttributes;
|
|
14
43
|
resources: FetchResponse[];
|
|
15
44
|
errors: KubernetesFetchError[];
|
|
16
45
|
}
|
|
@@ -18,7 +47,7 @@ interface ObjectsByEntityResponse {
|
|
|
18
47
|
items: ClusterObjects[];
|
|
19
48
|
}
|
|
20
49
|
declare type AuthProviderType = 'google' | 'serviceAccount' | 'aws';
|
|
21
|
-
declare type FetchResponse = PodFetchResponse | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | IngressesFetchResponse | CustomResourceFetchResponse;
|
|
50
|
+
declare type FetchResponse = PodFetchResponse | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | JobsFetchResponse | CronJobsFetchResponse | IngressesFetchResponse | CustomResourceFetchResponse;
|
|
22
51
|
interface PodFetchResponse {
|
|
23
52
|
type: 'pods';
|
|
24
53
|
resources: Array<V1Pod>;
|
|
@@ -43,6 +72,14 @@ interface HorizontalPodAutoscalersFetchResponse {
|
|
|
43
72
|
type: 'horizontalpodautoscalers';
|
|
44
73
|
resources: Array<V1HorizontalPodAutoscaler>;
|
|
45
74
|
}
|
|
75
|
+
interface JobsFetchResponse {
|
|
76
|
+
type: 'jobs';
|
|
77
|
+
resources: Array<V1Job>;
|
|
78
|
+
}
|
|
79
|
+
interface CronJobsFetchResponse {
|
|
80
|
+
type: 'cronjobs';
|
|
81
|
+
resources: Array<V1CronJob>;
|
|
82
|
+
}
|
|
46
83
|
interface IngressesFetchResponse {
|
|
47
84
|
type: 'ingresses';
|
|
48
85
|
resources: Array<ExtensionsV1beta1Ingress>;
|
|
@@ -58,4 +95,4 @@ interface KubernetesFetchError {
|
|
|
58
95
|
}
|
|
59
96
|
declare type KubernetesErrorTypes = 'BAD_REQUEST' | 'UNAUTHORIZED_ERROR' | 'SYSTEM_ERROR' | 'UNKNOWN_ERROR';
|
|
60
97
|
|
|
61
|
-
export { AuthProviderType, ClusterObjects, ConfigMapFetchResponse, CustomResourceFetchResponse, DeploymentFetchResponse, FetchResponse, HorizontalPodAutoscalersFetchResponse, IngressesFetchResponse, KubernetesErrorTypes, KubernetesFetchError, KubernetesRequestBody, ObjectsByEntityResponse, PodFetchResponse, ReplicaSetsFetchResponse, ServiceFetchResponse };
|
|
98
|
+
export { AuthProviderType, 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.1.
|
|
5
|
-
"main": "dist/index.
|
|
4
|
+
"version": "0.1.7",
|
|
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.
|
|
38
|
+
"@backstage/catalog-model": "^0.9.7",
|
|
39
39
|
"@kubernetes/client-node": "^0.15.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@backstage/cli": "^0.
|
|
42
|
+
"@backstage/cli": "^0.10.0"
|
|
43
43
|
},
|
|
44
44
|
"jest": {
|
|
45
45
|
"roots": [
|
|
46
46
|
".."
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "a05e7081b805006e3f0b2960a08a7753357f532f",
|
|
50
|
+
"module": "dist/index.esm.js"
|
|
50
51
|
}
|