@backstage/plugin-kubernetes 0.10.4-next.0 → 0.11.0-next.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 +37 -0
- package/dist/index.d.ts +4 -664
- package/dist/index.esm.js +39 -3609
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -13
- package/dist/assets/emptystate.svg +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes
|
|
2
2
|
|
|
3
|
+
## 0.11.0-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 95518765ee: Add Kubernetes cluster plugin. Viewing Kubernetes clusters as an Admin from Backstage
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/core-components@0.13.6-next.2
|
|
10
|
+
- @backstage/core-plugin-api@1.7.0-next.1
|
|
11
|
+
- @backstage/catalog-model@1.4.3-next.0
|
|
12
|
+
- @backstage/plugin-catalog-react@1.8.5-next.2
|
|
13
|
+
- @backstage/errors@1.2.3-next.0
|
|
14
|
+
- @backstage/plugin-kubernetes-react@0.1.0-next.1
|
|
15
|
+
- @backstage/theme@0.4.3-next.0
|
|
16
|
+
- @backstage/plugin-kubernetes-common@0.7.0-next.1
|
|
17
|
+
- @backstage/config@1.1.1-next.0
|
|
18
|
+
- @backstage/types@1.1.1
|
|
19
|
+
|
|
20
|
+
## 0.11.0-next.1
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- 2d8151061c: Refactor Kubernetes plugins in line with ADR 11, no breaking changes yet
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- @backstage/core-components@0.13.6-next.1
|
|
30
|
+
- @backstage/plugin-kubernetes-common@0.7.0-next.0
|
|
31
|
+
- @backstage/plugin-kubernetes-react@0.1.0-next.0
|
|
32
|
+
- @backstage/plugin-catalog-react@1.8.5-next.1
|
|
33
|
+
- @backstage/core-plugin-api@1.7.0-next.0
|
|
34
|
+
- @backstage/config@1.1.0
|
|
35
|
+
- @backstage/catalog-model@1.4.2
|
|
36
|
+
- @backstage/errors@1.2.2
|
|
37
|
+
- @backstage/theme@0.4.2
|
|
38
|
+
- @backstage/types@1.1.1
|
|
39
|
+
|
|
3
40
|
## 0.10.4-next.0
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
-
import
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import React__default from 'react';
|
|
3
|
+
import React from 'react';
|
|
6
4
|
import { Entity } from '@backstage/catalog-model';
|
|
7
|
-
|
|
8
|
-
import * as kubernetes_models_v1 from 'kubernetes-models/v1';
|
|
9
|
-
import { Event, Pod, IContainer, IContainerStatus } from 'kubernetes-models/v1';
|
|
10
|
-
import { JsonObject } from '@backstage/types';
|
|
11
|
-
import { V1Pod, V1ReplicaSet, V1Deployment, V1HorizontalPodAutoscaler, V1Service, V1ConfigMap, V1Ingress, V1Job, V1CronJob, V1StatefulSet, V1ObjectMeta } from '@kubernetes/client-node';
|
|
12
|
-
import { IObjectMeta, IIoK8sApimachineryPkgApisMetaV1ObjectMeta } from '@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta';
|
|
13
|
-
import * as react_use_lib_useAsyncFn from 'react-use/lib/useAsyncFn';
|
|
14
|
-
import { Pod as Pod$1 } from 'kubernetes-models/v1/Pod';
|
|
15
|
-
import { TypeMeta } from '@kubernetes-models/base';
|
|
5
|
+
export * from '@backstage/plugin-kubernetes-react';
|
|
16
6
|
|
|
17
7
|
declare const kubernetesPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
18
8
|
entityContent: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
@@ -33,656 +23,6 @@ declare const EntityKubernetesContent: (props: EntityKubernetesContentProps) =>
|
|
|
33
23
|
declare const isKubernetesAvailable: (entity: Entity) => boolean;
|
|
34
24
|
declare const Router: (props: {
|
|
35
25
|
refreshIntervalMs?: number;
|
|
36
|
-
}) =>
|
|
26
|
+
}) => React.JSX.Element;
|
|
37
27
|
|
|
38
|
-
|
|
39
|
-
declare const kubernetesProxyApiRef: _backstage_core_plugin_api.ApiRef<KubernetesProxyApi>;
|
|
40
|
-
interface KubernetesApi {
|
|
41
|
-
getObjectsByEntity(requestBody: KubernetesRequestBody): Promise<ObjectsByEntityResponse>;
|
|
42
|
-
getClusters(): Promise<{
|
|
43
|
-
name: string;
|
|
44
|
-
authProvider: string;
|
|
45
|
-
oidcTokenProvider?: string | undefined;
|
|
46
|
-
}[]>;
|
|
47
|
-
getWorkloadsByEntity(request: WorkloadsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
48
|
-
getCustomObjectsByEntity(request: CustomObjectsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
49
|
-
proxy(options: {
|
|
50
|
-
clusterName: string;
|
|
51
|
-
path: string;
|
|
52
|
-
init?: RequestInit;
|
|
53
|
-
}): Promise<Response>;
|
|
54
|
-
}
|
|
55
|
-
interface KubernetesProxyApi {
|
|
56
|
-
getPodLogs(request: {
|
|
57
|
-
podName: string;
|
|
58
|
-
namespace: string;
|
|
59
|
-
clusterName: string;
|
|
60
|
-
containerName: string;
|
|
61
|
-
previous?: boolean;
|
|
62
|
-
}): Promise<{
|
|
63
|
-
text: string;
|
|
64
|
-
}>;
|
|
65
|
-
getEventsByInvolvedObjectName(request: {
|
|
66
|
-
clusterName: string;
|
|
67
|
-
involvedObjectName: string;
|
|
68
|
-
namespace: string;
|
|
69
|
-
}): Promise<Event[]>;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
interface KubernetesAuthProvider {
|
|
73
|
-
decorateRequestBodyForAuth(requestBody: KubernetesRequestBody): Promise<KubernetesRequestBody>;
|
|
74
|
-
getCredentials(): Promise<{
|
|
75
|
-
token?: string;
|
|
76
|
-
}>;
|
|
77
|
-
}
|
|
78
|
-
declare const kubernetesAuthProvidersApiRef: _backstage_core_plugin_api.ApiRef<KubernetesAuthProvidersApi>;
|
|
79
|
-
interface KubernetesAuthProvidersApi {
|
|
80
|
-
decorateRequestBodyForAuth(authProvider: string, requestBody: KubernetesRequestBody): Promise<KubernetesRequestBody>;
|
|
81
|
-
getCredentials(authProvider: string): Promise<{
|
|
82
|
-
token?: string;
|
|
83
|
-
}>;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
declare class KubernetesAuthProviders implements KubernetesAuthProvidersApi {
|
|
87
|
-
private readonly kubernetesAuthProviderMap;
|
|
88
|
-
constructor(options: {
|
|
89
|
-
microsoftAuthApi: OAuthApi;
|
|
90
|
-
googleAuthApi: OAuthApi;
|
|
91
|
-
oidcProviders?: {
|
|
92
|
-
[key: string]: OpenIdConnectApi;
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
decorateRequestBodyForAuth(authProvider: string, requestBody: KubernetesRequestBody): Promise<KubernetesRequestBody>;
|
|
96
|
-
getCredentials(authProvider: string): Promise<{
|
|
97
|
-
token?: string;
|
|
98
|
-
}>;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
declare class GoogleKubernetesAuthProvider implements KubernetesAuthProvider {
|
|
102
|
-
authProvider: OAuthApi;
|
|
103
|
-
constructor(authProvider: OAuthApi);
|
|
104
|
-
decorateRequestBodyForAuth(requestBody: KubernetesRequestBody): Promise<KubernetesRequestBody>;
|
|
105
|
-
getCredentials(): Promise<{
|
|
106
|
-
token: string;
|
|
107
|
-
}>;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* No-op KubernetesAuthProvider, authorization will be handled in the kubernetes-backend plugin
|
|
112
|
-
*
|
|
113
|
-
* @public
|
|
114
|
-
*/
|
|
115
|
-
declare class ServerSideKubernetesAuthProvider implements KubernetesAuthProvider {
|
|
116
|
-
decorateRequestBodyForAuth(requestBody: KubernetesRequestBody): Promise<KubernetesRequestBody>;
|
|
117
|
-
getCredentials(): Promise<{}>;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
declare class KubernetesBackendClient implements KubernetesApi {
|
|
121
|
-
private readonly discoveryApi;
|
|
122
|
-
private readonly identityApi;
|
|
123
|
-
private readonly kubernetesAuthProvidersApi;
|
|
124
|
-
constructor(options: {
|
|
125
|
-
discoveryApi: DiscoveryApi;
|
|
126
|
-
identityApi: IdentityApi;
|
|
127
|
-
kubernetesAuthProvidersApi: KubernetesAuthProvidersApi;
|
|
128
|
-
});
|
|
129
|
-
private handleResponse;
|
|
130
|
-
private postRequired;
|
|
131
|
-
private getCluster;
|
|
132
|
-
private getCredentials;
|
|
133
|
-
getObjectsByEntity(requestBody: KubernetesRequestBody): Promise<ObjectsByEntityResponse>;
|
|
134
|
-
getWorkloadsByEntity(request: WorkloadsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
135
|
-
getCustomObjectsByEntity(request: CustomObjectsByEntityRequest): Promise<ObjectsByEntityResponse>;
|
|
136
|
-
getClusters(): Promise<{
|
|
137
|
-
name: string;
|
|
138
|
-
authProvider: string;
|
|
139
|
-
}[]>;
|
|
140
|
-
proxy(options: {
|
|
141
|
-
clusterName: string;
|
|
142
|
-
path: string;
|
|
143
|
-
init?: RequestInit;
|
|
144
|
-
}): Promise<Response>;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* A client for common requests through the proxy endpoint of the kubernetes backend plugin.
|
|
149
|
-
*
|
|
150
|
-
* @public
|
|
151
|
-
*/
|
|
152
|
-
declare class KubernetesProxyClient {
|
|
153
|
-
private readonly kubernetesApi;
|
|
154
|
-
constructor(options: {
|
|
155
|
-
kubernetesApi: KubernetesApi;
|
|
156
|
-
});
|
|
157
|
-
private handleText;
|
|
158
|
-
private handleJson;
|
|
159
|
-
getEventsByInvolvedObjectName({ clusterName, involvedObjectName, namespace, }: {
|
|
160
|
-
clusterName: string;
|
|
161
|
-
involvedObjectName: string;
|
|
162
|
-
namespace: string;
|
|
163
|
-
}): Promise<Event[]>;
|
|
164
|
-
getPodLogs({ podName, namespace, clusterName, containerName, previous, }: {
|
|
165
|
-
podName: string;
|
|
166
|
-
namespace: string;
|
|
167
|
-
clusterName: string;
|
|
168
|
-
containerName: string;
|
|
169
|
-
previous?: boolean;
|
|
170
|
-
}): Promise<{
|
|
171
|
-
text: string;
|
|
172
|
-
}>;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
type FormatClusterLinkOptions = {
|
|
176
|
-
dashboardUrl?: string;
|
|
177
|
-
dashboardApp?: string;
|
|
178
|
-
dashboardParameters?: JsonObject;
|
|
179
|
-
object: any;
|
|
180
|
-
kind: string;
|
|
181
|
-
};
|
|
182
|
-
declare function formatClusterLink(options: FormatClusterLinkOptions): string | undefined;
|
|
183
|
-
|
|
184
|
-
interface DeploymentResources {
|
|
185
|
-
pods: V1Pod[];
|
|
186
|
-
replicaSets: V1ReplicaSet[];
|
|
187
|
-
deployments: V1Deployment[];
|
|
188
|
-
horizontalPodAutoscalers: V1HorizontalPodAutoscaler[];
|
|
189
|
-
}
|
|
190
|
-
interface GroupedResponses extends DeploymentResources {
|
|
191
|
-
services: V1Service[];
|
|
192
|
-
configMaps: V1ConfigMap[];
|
|
193
|
-
ingresses: V1Ingress[];
|
|
194
|
-
jobs: V1Job[];
|
|
195
|
-
cronJobs: V1CronJob[];
|
|
196
|
-
customResources: any[];
|
|
197
|
-
statefulsets: V1StatefulSet[];
|
|
198
|
-
}
|
|
199
|
-
interface ClusterLinksFormatterOptions {
|
|
200
|
-
dashboardUrl?: URL;
|
|
201
|
-
dashboardParameters?: JsonObject;
|
|
202
|
-
object: any;
|
|
203
|
-
kind: string;
|
|
204
|
-
}
|
|
205
|
-
type ClusterLinksFormatter = (options: ClusterLinksFormatterOptions) => URL;
|
|
206
|
-
|
|
207
|
-
declare const clusterLinksFormatters: Record<string, ClusterLinksFormatter>;
|
|
208
|
-
|
|
209
|
-
type ClusterProps = {
|
|
210
|
-
clusterObjects: ClusterObjects;
|
|
211
|
-
podsWithErrors: Set<string>;
|
|
212
|
-
children?: React__default.ReactNode;
|
|
213
|
-
};
|
|
214
|
-
declare const Cluster: ({ clusterObjects, podsWithErrors }: ClusterProps) => React__default.JSX.Element;
|
|
215
|
-
|
|
216
|
-
type CronJobsAccordionsProps = {
|
|
217
|
-
children?: React__default.ReactNode;
|
|
218
|
-
};
|
|
219
|
-
declare const CronJobsAccordions: ({}: CronJobsAccordionsProps) => React__default.JSX.Element;
|
|
220
|
-
|
|
221
|
-
interface CustomResourcesProps {
|
|
222
|
-
children?: React__default.ReactNode;
|
|
223
|
-
}
|
|
224
|
-
declare const CustomResources: ({}: CustomResourcesProps) => React__default.JSX.Element;
|
|
225
|
-
|
|
226
|
-
type ErrorPanelProps$1 = {
|
|
227
|
-
entityName: string;
|
|
228
|
-
errorMessage?: string;
|
|
229
|
-
clustersWithErrors?: ClusterObjects[];
|
|
230
|
-
children?: React__default.ReactNode;
|
|
231
|
-
};
|
|
232
|
-
declare const ErrorPanel: ({ entityName, errorMessage, clustersWithErrors, }: ErrorPanelProps$1) => React__default.JSX.Element;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Severity of the error, where 10 is critical and 0 is very low.
|
|
236
|
-
*
|
|
237
|
-
* @public
|
|
238
|
-
*/
|
|
239
|
-
type ErrorSeverity = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
240
|
-
/**
|
|
241
|
-
* A list of errors keyed by Cluster name
|
|
242
|
-
*
|
|
243
|
-
* @public
|
|
244
|
-
*/
|
|
245
|
-
type DetectedErrorsByCluster = Map<string, DetectedError[]>;
|
|
246
|
-
/**
|
|
247
|
-
* A reference to a Kubernetes object
|
|
248
|
-
*
|
|
249
|
-
* @public
|
|
250
|
-
*/
|
|
251
|
-
interface ResourceRef {
|
|
252
|
-
name: string;
|
|
253
|
-
namespace: string;
|
|
254
|
-
kind: string;
|
|
255
|
-
apiGroup: string;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Represents an error found on a Kubernetes object
|
|
259
|
-
*
|
|
260
|
-
* @public
|
|
261
|
-
*/
|
|
262
|
-
interface DetectedError {
|
|
263
|
-
type: string;
|
|
264
|
-
severity: ErrorSeverity;
|
|
265
|
-
message: string;
|
|
266
|
-
proposedFix?: ProposedFix;
|
|
267
|
-
sourceRef: ResourceRef;
|
|
268
|
-
occurrenceCount: number;
|
|
269
|
-
}
|
|
270
|
-
type ProposedFix = LogSolution | DocsSolution | EventsSolution;
|
|
271
|
-
interface ProposedFixBase {
|
|
272
|
-
errorType: string;
|
|
273
|
-
rootCauseExplanation: string;
|
|
274
|
-
actions: string[];
|
|
275
|
-
}
|
|
276
|
-
interface LogSolution extends ProposedFixBase {
|
|
277
|
-
type: 'logs';
|
|
278
|
-
container: string;
|
|
279
|
-
}
|
|
280
|
-
interface DocsSolution extends ProposedFixBase {
|
|
281
|
-
type: 'docs';
|
|
282
|
-
docsLink: string;
|
|
283
|
-
}
|
|
284
|
-
interface EventsSolution extends ProposedFixBase {
|
|
285
|
-
type: 'events';
|
|
286
|
-
podName: string;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* For each cluster try to find errors in each of the object types provided
|
|
291
|
-
* returning a map of cluster names to errors in that cluster
|
|
292
|
-
*
|
|
293
|
-
* @public
|
|
294
|
-
*/
|
|
295
|
-
declare const detectErrors: (objects: ObjectsByEntityResponse) => DetectedErrorsByCluster;
|
|
296
|
-
|
|
297
|
-
type ErrorReportingProps = {
|
|
298
|
-
detectedErrors: DetectedErrorsByCluster;
|
|
299
|
-
};
|
|
300
|
-
declare const ErrorReporting: ({ detectedErrors }: ErrorReportingProps) => React.JSX.Element;
|
|
301
|
-
|
|
302
|
-
/** @public */
|
|
303
|
-
declare const HorizontalPodAutoscalerDrawer: (props: {
|
|
304
|
-
hpa: V1HorizontalPodAutoscaler;
|
|
305
|
-
expanded?: boolean;
|
|
306
|
-
children?: React__default.ReactNode;
|
|
307
|
-
}) => React__default.JSX.Element;
|
|
308
|
-
|
|
309
|
-
type IngressesAccordionsProps = {};
|
|
310
|
-
declare const IngressesAccordions: ({}: IngressesAccordionsProps) => React__default.JSX.Element;
|
|
311
|
-
|
|
312
|
-
type JobsAccordionsProps = {
|
|
313
|
-
jobs: V1Job[];
|
|
314
|
-
children?: React__default.ReactNode;
|
|
315
|
-
};
|
|
316
|
-
declare const JobsAccordions: ({ jobs }: JobsAccordionsProps) => React__default.JSX.Element;
|
|
317
|
-
|
|
318
|
-
type ErrorPanelProps = {
|
|
319
|
-
cluster: ClusterAttributes;
|
|
320
|
-
errorMessage?: string;
|
|
321
|
-
children?: React__default.ReactNode;
|
|
322
|
-
};
|
|
323
|
-
declare const LinkErrorPanel: ({ cluster, errorMessage }: ErrorPanelProps) => React__default.JSX.Element;
|
|
324
|
-
interface KubernetesDrawerable {
|
|
325
|
-
metadata?: V1ObjectMeta;
|
|
326
|
-
}
|
|
327
|
-
interface KubernetesStructuredMetadataTableDrawerProps<T extends KubernetesDrawerable> {
|
|
328
|
-
object: T;
|
|
329
|
-
renderObject: (obj: T) => object;
|
|
330
|
-
buttonVariant?: 'h5' | 'subtitle2';
|
|
331
|
-
kind: string;
|
|
332
|
-
expanded?: boolean;
|
|
333
|
-
children?: React__default.ReactNode;
|
|
334
|
-
}
|
|
335
|
-
declare const KubernetesStructuredMetadataTableDrawer: <T extends KubernetesDrawerable>({ object, renderObject, kind, buttonVariant, expanded, children, }: KubernetesStructuredMetadataTableDrawerProps<T>) => React__default.JSX.Element;
|
|
336
|
-
|
|
337
|
-
interface KubernetesObject {
|
|
338
|
-
kind: string;
|
|
339
|
-
metadata?: IObjectMeta;
|
|
340
|
-
}
|
|
341
|
-
interface KubernetesDrawerContentProps {
|
|
342
|
-
close: () => void;
|
|
343
|
-
kubernetesObject: KubernetesObject;
|
|
344
|
-
header?: React__default.ReactNode;
|
|
345
|
-
children?: React__default.ReactNode;
|
|
346
|
-
}
|
|
347
|
-
declare const KubernetesDrawerContent: ({ children, header, kubernetesObject, close, }: KubernetesDrawerContentProps) => React__default.JSX.Element;
|
|
348
|
-
interface KubernetesDrawerProps {
|
|
349
|
-
open?: boolean;
|
|
350
|
-
kubernetesObject: KubernetesObject;
|
|
351
|
-
label: React__default.ReactNode;
|
|
352
|
-
drawerContentsHeader?: React__default.ReactNode;
|
|
353
|
-
children?: React__default.ReactNode;
|
|
354
|
-
}
|
|
355
|
-
declare const KubernetesDrawer: ({ open, label, drawerContentsHeader, kubernetesObject, children, }: KubernetesDrawerProps) => React__default.JSX.Element;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Wraps a pod with the associated detected errors and cluster name
|
|
359
|
-
*
|
|
360
|
-
* @public
|
|
361
|
-
*/
|
|
362
|
-
interface PodAndErrors {
|
|
363
|
-
clusterName: string;
|
|
364
|
-
pod: Pod;
|
|
365
|
-
errors: DetectedError[];
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Props for PodDrawer
|
|
370
|
-
*
|
|
371
|
-
* @public
|
|
372
|
-
*/
|
|
373
|
-
interface PodDrawerProps {
|
|
374
|
-
open?: boolean;
|
|
375
|
-
podAndErrors: PodAndErrors;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* A Drawer for Kubernetes Pods
|
|
379
|
-
*
|
|
380
|
-
* @public
|
|
381
|
-
*/
|
|
382
|
-
declare const PodDrawer: ({ podAndErrors, open }: PodDrawerProps) => React__default.JSX.Element;
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Contains the details needed to make a log request to Kubernetes, except the container name
|
|
386
|
-
*
|
|
387
|
-
* @public
|
|
388
|
-
*/
|
|
389
|
-
interface PodScope {
|
|
390
|
-
podName: string;
|
|
391
|
-
podNamespace: string;
|
|
392
|
-
clusterName: string;
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Contains the details needed to make a log request to Kubernetes
|
|
396
|
-
*
|
|
397
|
-
* @public
|
|
398
|
-
*/
|
|
399
|
-
interface ContainerScope extends PodScope {
|
|
400
|
-
containerName: string;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* Props for PodLogs
|
|
405
|
-
*
|
|
406
|
-
* @public
|
|
407
|
-
*/
|
|
408
|
-
interface PodLogsProps {
|
|
409
|
-
containerScope: ContainerScope;
|
|
410
|
-
previous?: boolean;
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Shows the logs for the given pod
|
|
414
|
-
*
|
|
415
|
-
* @public
|
|
416
|
-
*/
|
|
417
|
-
declare const PodLogs: React__default.FC<PodLogsProps>;
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Props for PodLogsDialog
|
|
421
|
-
*
|
|
422
|
-
* @public
|
|
423
|
-
*/
|
|
424
|
-
interface PodLogsDialogProps {
|
|
425
|
-
containerScope: ContainerScope;
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Shows the logs for the given pod in a Dialog
|
|
429
|
-
*
|
|
430
|
-
* @public
|
|
431
|
-
*/
|
|
432
|
-
declare const PodLogsDialog: ({ containerScope }: PodLogsDialogProps) => React__default.JSX.Element;
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Arguments for usePodLogs
|
|
436
|
-
*
|
|
437
|
-
* @public
|
|
438
|
-
*/
|
|
439
|
-
interface PodLogsOptions {
|
|
440
|
-
containerScope: ContainerScope;
|
|
441
|
-
previous?: boolean;
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Retrieves the logs for the given pod
|
|
445
|
-
*
|
|
446
|
-
* @public
|
|
447
|
-
*/
|
|
448
|
-
declare const usePodLogs: ({ containerScope, previous }: PodLogsOptions) => react_use_lib_useAsyncFn.AsyncState<{
|
|
449
|
-
text: string;
|
|
450
|
-
}>;
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Props for ContainerCard
|
|
454
|
-
*
|
|
455
|
-
* @public
|
|
456
|
-
*/
|
|
457
|
-
interface ContainerCardProps {
|
|
458
|
-
podScope: PodScope;
|
|
459
|
-
containerSpec?: IContainer;
|
|
460
|
-
containerStatus: IContainerStatus;
|
|
461
|
-
containerMetrics?: ClientContainerStatus;
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Shows details about a container within a pod
|
|
465
|
-
*
|
|
466
|
-
* @public
|
|
467
|
-
*/
|
|
468
|
-
declare const ContainerCard: React__default.FC<ContainerCardProps>;
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Props for PendingPodContent
|
|
472
|
-
*
|
|
473
|
-
* @public
|
|
474
|
-
*/
|
|
475
|
-
interface PendingPodContentProps {
|
|
476
|
-
pod: Pod;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Shows details about pod's conditions as it starts
|
|
480
|
-
*
|
|
481
|
-
* @public
|
|
482
|
-
*/
|
|
483
|
-
declare const PendingPodContent: ({ pod }: PendingPodContentProps) => React__default.JSX.Element;
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Props for FixDialog
|
|
487
|
-
*
|
|
488
|
-
* @public
|
|
489
|
-
*/
|
|
490
|
-
interface FixDialogProps {
|
|
491
|
-
open?: boolean;
|
|
492
|
-
clusterName: string;
|
|
493
|
-
pod: Pod$1;
|
|
494
|
-
error: DetectedError;
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* A dialog for fixing detected Kubernetes errors
|
|
498
|
-
*
|
|
499
|
-
* @public
|
|
500
|
-
*/
|
|
501
|
-
declare const FixDialog: React__default.FC<FixDialogProps>;
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Props for Events
|
|
505
|
-
*
|
|
506
|
-
* @public
|
|
507
|
-
*/
|
|
508
|
-
interface EventsContentProps {
|
|
509
|
-
warningEventsOnly?: boolean;
|
|
510
|
-
events: Event[];
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Shows given Kubernetes events
|
|
514
|
-
*
|
|
515
|
-
* @public
|
|
516
|
-
*/
|
|
517
|
-
declare const EventsContent: ({ events, warningEventsOnly, }: EventsContentProps) => React__default.JSX.Element;
|
|
518
|
-
/**
|
|
519
|
-
* Props for Events
|
|
520
|
-
*
|
|
521
|
-
* @public
|
|
522
|
-
*/
|
|
523
|
-
interface EventsProps {
|
|
524
|
-
involvedObjectName: string;
|
|
525
|
-
namespace: string;
|
|
526
|
-
clusterName: string;
|
|
527
|
-
warningEventsOnly?: boolean;
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Retrieves and shows Kubernetes events for the given object
|
|
531
|
-
*
|
|
532
|
-
* @public
|
|
533
|
-
*/
|
|
534
|
-
declare const Events: ({ involvedObjectName, namespace, clusterName, warningEventsOnly, }: EventsProps) => React__default.JSX.Element;
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Arguments for useEvents
|
|
538
|
-
*
|
|
539
|
-
* @public
|
|
540
|
-
*/
|
|
541
|
-
interface EventsOptions {
|
|
542
|
-
involvedObjectName: string;
|
|
543
|
-
namespace: string;
|
|
544
|
-
clusterName: string;
|
|
545
|
-
}
|
|
546
|
-
/**
|
|
547
|
-
* Retrieves the events for the given object
|
|
548
|
-
*
|
|
549
|
-
* @public
|
|
550
|
-
*/
|
|
551
|
-
declare const useEvents: ({ involvedObjectName, namespace, clusterName, }: EventsOptions) => react_use_lib_useAsyncFn.AsyncState<kubernetes_models_v1.Event[]>;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Props for ErrorList
|
|
555
|
-
*
|
|
556
|
-
* @public
|
|
557
|
-
*/
|
|
558
|
-
interface ErrorListProps {
|
|
559
|
-
podAndErrors: PodAndErrors[];
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* Shows a list of errors found on a Pod
|
|
563
|
-
*
|
|
564
|
-
* @public
|
|
565
|
-
*/
|
|
566
|
-
declare const ErrorList: ({ podAndErrors }: ErrorListProps) => React__default.JSX.Element;
|
|
567
|
-
|
|
568
|
-
type PodColumns = 'READY' | 'RESOURCE';
|
|
569
|
-
type PodsTablesProps = {
|
|
570
|
-
pods: Pod$1 | V1Pod[];
|
|
571
|
-
extraColumns?: PodColumns[];
|
|
572
|
-
children?: React__default.ReactNode;
|
|
573
|
-
};
|
|
574
|
-
declare const PodsTable: ({ pods, extraColumns }: PodsTablesProps) => React__default.JSX.Element;
|
|
575
|
-
|
|
576
|
-
type ServicesAccordionsProps = {};
|
|
577
|
-
declare const ServicesAccordions: ({}: ServicesAccordionsProps) => React__default.JSX.Element;
|
|
578
|
-
|
|
579
|
-
type KubernetesContentProps = {
|
|
580
|
-
entity: Entity;
|
|
581
|
-
refreshIntervalMs?: number;
|
|
582
|
-
children?: React__default.ReactNode;
|
|
583
|
-
};
|
|
584
|
-
declare const KubernetesContent: ({ entity, refreshIntervalMs, }: KubernetesContentProps) => React__default.JSX.Element;
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Context for Pod Metrics
|
|
588
|
-
*
|
|
589
|
-
* @public
|
|
590
|
-
*/
|
|
591
|
-
interface ResourceUtilizationProps {
|
|
592
|
-
compressed?: boolean;
|
|
593
|
-
title: string;
|
|
594
|
-
usage: number | string;
|
|
595
|
-
total: number | string;
|
|
596
|
-
totalFormatted: string;
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Context for Pod Metrics
|
|
600
|
-
*
|
|
601
|
-
* @public
|
|
602
|
-
*/
|
|
603
|
-
declare const ResourceUtilization: ({ compressed, title, usage, total, totalFormatted, }: ResourceUtilizationProps) => React__default.JSX.Element;
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* Props drilled down to the PodExecTerminal component
|
|
607
|
-
*
|
|
608
|
-
* @public
|
|
609
|
-
*/
|
|
610
|
-
interface PodExecTerminalProps {
|
|
611
|
-
clusterName: string;
|
|
612
|
-
containerName: string;
|
|
613
|
-
podName: string;
|
|
614
|
-
podNamespace: string;
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* Executes a `/bin/sh` process in the given pod's container and opens a terminal connected to it
|
|
618
|
-
*
|
|
619
|
-
* @public
|
|
620
|
-
*/
|
|
621
|
-
declare const PodExecTerminal: (props: PodExecTerminalProps) => React__default.JSX.Element;
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* Opens a terminal connected to the given pod's container in a dialog
|
|
625
|
-
*
|
|
626
|
-
* @public
|
|
627
|
-
*/
|
|
628
|
-
declare const PodExecTerminalDialog: (props: PodExecTerminalProps) => React__default.JSX.Element;
|
|
629
|
-
|
|
630
|
-
interface KubernetesObjects {
|
|
631
|
-
kubernetesObjects?: ObjectsByEntityResponse;
|
|
632
|
-
loading: boolean;
|
|
633
|
-
error?: string;
|
|
634
|
-
}
|
|
635
|
-
declare const useKubernetesObjects: (entity: Entity, intervalMs?: number) => KubernetesObjects;
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* Retrieves the provided custom resources related to the provided entity, refreshes at an interval.
|
|
639
|
-
*
|
|
640
|
-
* @public
|
|
641
|
-
*/
|
|
642
|
-
declare const useCustomResources: (entity: Entity, customResourceMatchers: CustomResourceMatcher[], intervalMs?: number) => KubernetesObjects;
|
|
643
|
-
|
|
644
|
-
declare const PodNamesWithErrorsContext: React__default.Context<Set<string>>;
|
|
645
|
-
|
|
646
|
-
declare const PodNamesWithMetricsContext: React__default.Context<Map<string, ClientPodStatus>>;
|
|
647
|
-
|
|
648
|
-
declare const GroupedResponsesContext: React__default.Context<GroupedResponses>;
|
|
649
|
-
|
|
650
|
-
declare const ClusterContext: React__default.Context<ClusterAttributes>;
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Context for Pod Metrics
|
|
654
|
-
*
|
|
655
|
-
* @public
|
|
656
|
-
*/
|
|
657
|
-
declare const PodMetricsContext: React__default.Context<Map<string, ClientPodStatus[]>>;
|
|
658
|
-
type PodMetricsMatcher = {
|
|
659
|
-
metadata?: IObjectMeta;
|
|
660
|
-
};
|
|
661
|
-
/**
|
|
662
|
-
* Find metrics matching the provided pod
|
|
663
|
-
*
|
|
664
|
-
* @public
|
|
665
|
-
*/
|
|
666
|
-
declare const usePodMetrics: (clusterName: string, matcher: PodMetricsMatcher) => ClientPodStatus | undefined;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Context for detected errors
|
|
670
|
-
*
|
|
671
|
-
* @public
|
|
672
|
-
*/
|
|
673
|
-
declare const DetectedErrorsContext: React__default.Context<DetectedError[]>;
|
|
674
|
-
/**
|
|
675
|
-
*
|
|
676
|
-
* @public
|
|
677
|
-
*/
|
|
678
|
-
type ErrorMatcher = {
|
|
679
|
-
metadata?: IIoK8sApimachineryPkgApisMetaV1ObjectMeta;
|
|
680
|
-
} & TypeMeta;
|
|
681
|
-
/**
|
|
682
|
-
* Find errors which match the resource
|
|
683
|
-
*
|
|
684
|
-
* @public
|
|
685
|
-
*/
|
|
686
|
-
declare const useMatchingErrors: (matcher: ErrorMatcher) => DetectedError[];
|
|
687
|
-
|
|
688
|
-
export { Cluster, ClusterContext, ClusterLinksFormatter, ClusterLinksFormatterOptions, ContainerCard, ContainerCardProps, ContainerScope, CronJobsAccordions, CustomResources, DeploymentResources, DetectedError, DetectedErrorsByCluster, DetectedErrorsContext, EntityKubernetesContent, EntityKubernetesContentProps, ErrorList, ErrorListProps, ErrorMatcher, ErrorPanel, ErrorReporting, ErrorSeverity, Events, EventsContent, EventsContentProps, EventsOptions, EventsProps, FixDialog, FixDialogProps, GoogleKubernetesAuthProvider, GroupedResponses, GroupedResponsesContext, HorizontalPodAutoscalerDrawer, IngressesAccordions, JobsAccordions, KubernetesApi, KubernetesAuthProviders, KubernetesAuthProvidersApi, KubernetesBackendClient, KubernetesContent, KubernetesDrawer, KubernetesDrawerContent, KubernetesObjects, KubernetesProxyApi, KubernetesProxyClient, KubernetesStructuredMetadataTableDrawer, LinkErrorPanel, PendingPodContent, PendingPodContentProps, PodAndErrors, PodDrawer, PodExecTerminal, PodExecTerminalDialog, PodExecTerminalProps, PodLogs, PodLogsDialog, PodLogsDialogProps, PodLogsOptions, PodLogsProps, PodMetricsContext, PodMetricsMatcher, PodNamesWithErrorsContext, PodNamesWithMetricsContext, PodScope, PodsTable, ResourceRef, ResourceUtilization, Router, ServerSideKubernetesAuthProvider, ServicesAccordions, clusterLinksFormatters, detectErrors, formatClusterLink, isKubernetesAvailable, kubernetesApiRef, kubernetesAuthProvidersApiRef, kubernetesPlugin, kubernetesProxyApiRef, kubernetesPlugin as plugin, useCustomResources, useEvents, useKubernetesObjects, useMatchingErrors, usePodLogs, usePodMetrics };
|
|
28
|
+
export { EntityKubernetesContent, EntityKubernetesContentProps, Router, isKubernetesAvailable, kubernetesPlugin, kubernetesPlugin as plugin };
|