@backstage/plugin-kubernetes-react 0.3.0-next.3 → 0.3.1-next.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 +43 -0
- package/dist/index.esm.js +121 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-react
|
|
2
2
|
|
|
3
|
+
## 0.3.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4642cb7: Add support to fetch data for Daemon Sets and display an accordion in the same way as with Deployments
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/errors@1.2.4-next.0
|
|
10
|
+
- @backstage/core-components@0.14.1-next.0
|
|
11
|
+
- @backstage/plugin-kubernetes-common@0.7.5-next.0
|
|
12
|
+
- @backstage/catalog-model@1.4.5-next.0
|
|
13
|
+
- @backstage/core-plugin-api@1.9.1-next.0
|
|
14
|
+
- @backstage/types@1.1.1
|
|
15
|
+
|
|
16
|
+
## 0.3.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 0dfc185: **BREAKING** The `PodScope`, `PodAndErrors`, and `PodExecTerminalProps` types no
|
|
21
|
+
longer have a `clusterName` field; instead they now have the field `cluster`
|
|
22
|
+
which contains the full `ClusterAttributes`.
|
|
23
|
+
- 0d526c8: **BREAKING** The pod exec terminal is now disabled by default since there are several scenarios where it is known not to work. It can be re-enabled at your own risk by setting the config parameter `kubernetes.podExecTerminal.enabled` to `true`.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 5bf0c17: Pod dialogs display cluster title when specified.
|
|
28
|
+
- 74770c8: The `ErrorPanel` component will display the `title` field (when specified) for
|
|
29
|
+
clusters with errors.
|
|
30
|
+
- 536f67d: Fix broken XtermJS CSS import
|
|
31
|
+
- b01c86c: The `ErrorReporting` component's cluster column now displays cluster titles when
|
|
32
|
+
specified.
|
|
33
|
+
- 8fe56a8: Widen `@types/react` dependency range to include version 18.
|
|
34
|
+
- 8472188: Added or fixed the `repository` field in `package.json`.
|
|
35
|
+
- 2b305eb: The `Cluster` component now renders the cluster's title, if specified.
|
|
36
|
+
- 3c184af: Extracted common dialog component.
|
|
37
|
+
- db1054b: Fixed a bug where the logs dialog and any other functionality depending on the proxy endpoint would fail for clusters configured with the OIDC auth provider.
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
- @backstage/core-components@0.14.0
|
|
40
|
+
- @backstage/plugin-kubernetes-common@0.7.4
|
|
41
|
+
- @backstage/catalog-model@1.4.4
|
|
42
|
+
- @backstage/core-plugin-api@1.9.0
|
|
43
|
+
- @backstage/errors@1.2.3
|
|
44
|
+
- @backstage/types@1.1.1
|
|
45
|
+
|
|
3
46
|
## 0.3.0-next.3
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
package/dist/index.esm.js
CHANGED
|
@@ -330,6 +330,7 @@ const GroupedResponsesContext = React__default.createContext({
|
|
|
330
330
|
pods: [],
|
|
331
331
|
replicaSets: [],
|
|
332
332
|
deployments: [],
|
|
333
|
+
daemonSets: [],
|
|
333
334
|
services: [],
|
|
334
335
|
configMaps: [],
|
|
335
336
|
horizontalPodAutoscalers: [],
|
|
@@ -3182,6 +3183,125 @@ const CustomResources = ({}) => {
|
|
|
3182
3183
|
}));
|
|
3183
3184
|
};
|
|
3184
3185
|
|
|
3186
|
+
const DaemonSetDrawer = ({
|
|
3187
|
+
daemonset,
|
|
3188
|
+
expanded
|
|
3189
|
+
}) => {
|
|
3190
|
+
var _a, _b, _c;
|
|
3191
|
+
const namespace = (_a = daemonset.metadata) == null ? void 0 : _a.namespace;
|
|
3192
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
3193
|
+
KubernetesStructuredMetadataTableDrawer,
|
|
3194
|
+
{
|
|
3195
|
+
object: daemonset,
|
|
3196
|
+
expanded,
|
|
3197
|
+
kind: "DaemonSet",
|
|
3198
|
+
renderObject: (daemonsetObj) => {
|
|
3199
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
3200
|
+
return {
|
|
3201
|
+
updateStrategyType: (_c2 = (_b2 = (_a2 = daemonsetObj.spec) == null ? void 0 : _a2.updateStrategy) == null ? void 0 : _b2.type) != null ? _c2 : "???",
|
|
3202
|
+
minReadySeconds: (_e = (_d = daemonsetObj.spec) == null ? void 0 : _d.minReadySeconds) != null ? _e : "???",
|
|
3203
|
+
revisionHistoryLimit: (_g = (_f = daemonsetObj.spec) == null ? void 0 : _f.revisionHistoryLimit) != null ? _g : "???",
|
|
3204
|
+
currentNumberScheduled: (_i = (_h = daemonsetObj.status) == null ? void 0 : _h.currentNumberScheduled) != null ? _i : "???",
|
|
3205
|
+
desiredNumberScheduled: (_k = (_j = daemonsetObj.status) == null ? void 0 : _j.desiredNumberScheduled) != null ? _k : "???",
|
|
3206
|
+
numberAvailable: (_m = (_l = daemonsetObj.status) == null ? void 0 : _l.numberAvailable) != null ? _m : "???",
|
|
3207
|
+
numberMisscheduled: (_o = (_n = daemonsetObj.status) == null ? void 0 : _n.numberMisscheduled) != null ? _o : "???",
|
|
3208
|
+
numberReady: (_q = (_p = daemonsetObj.status) == null ? void 0 : _p.numberReady) != null ? _q : "???"
|
|
3209
|
+
};
|
|
3210
|
+
}
|
|
3211
|
+
},
|
|
3212
|
+
/* @__PURE__ */ React__default.createElement(
|
|
3213
|
+
Grid,
|
|
3214
|
+
{
|
|
3215
|
+
container: true,
|
|
3216
|
+
direction: "column",
|
|
3217
|
+
justifyContent: "flex-start",
|
|
3218
|
+
alignItems: "flex-start",
|
|
3219
|
+
spacing: 0
|
|
3220
|
+
},
|
|
3221
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "body1" }, (_c = (_b = daemonset.metadata) == null ? void 0 : _b.name) != null ? _c : "unknown object")),
|
|
3222
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Typography, { color: "textSecondary", variant: "subtitle1" }, "DaemonSet")),
|
|
3223
|
+
namespace && /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(Chip, { size: "small", label: `namespace: ${namespace}` }))
|
|
3224
|
+
)
|
|
3225
|
+
);
|
|
3226
|
+
};
|
|
3227
|
+
|
|
3228
|
+
const DaemonSetSummary = ({
|
|
3229
|
+
daemonset,
|
|
3230
|
+
numberOfCurrentPods,
|
|
3231
|
+
numberOfPodsWithErrors
|
|
3232
|
+
}) => {
|
|
3233
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
3234
|
+
Grid,
|
|
3235
|
+
{
|
|
3236
|
+
container: true,
|
|
3237
|
+
direction: "row",
|
|
3238
|
+
justifyContent: "space-between",
|
|
3239
|
+
alignItems: "center",
|
|
3240
|
+
spacing: 0
|
|
3241
|
+
},
|
|
3242
|
+
/* @__PURE__ */ React__default.createElement(Grid, { xs: 4, item: true }, /* @__PURE__ */ React__default.createElement(DaemonSetDrawer, { daemonset })),
|
|
3243
|
+
/* @__PURE__ */ React__default.createElement(
|
|
3244
|
+
Grid,
|
|
3245
|
+
{
|
|
3246
|
+
item: true,
|
|
3247
|
+
container: true,
|
|
3248
|
+
xs: 4,
|
|
3249
|
+
direction: "column",
|
|
3250
|
+
justifyContent: "flex-start",
|
|
3251
|
+
alignItems: "flex-end",
|
|
3252
|
+
spacing: 0
|
|
3253
|
+
},
|
|
3254
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(StatusOK, null, numberOfCurrentPods, " pods")),
|
|
3255
|
+
/* @__PURE__ */ React__default.createElement(Grid, { item: true }, numberOfPodsWithErrors > 0 ? /* @__PURE__ */ React__default.createElement(StatusError, null, numberOfPodsWithErrors, " pod", numberOfPodsWithErrors > 1 ? "s" : "", " with errors") : /* @__PURE__ */ React__default.createElement(StatusOK, null, "No pods with errors"))
|
|
3256
|
+
)
|
|
3257
|
+
);
|
|
3258
|
+
};
|
|
3259
|
+
const DaemonSetAccordion = ({
|
|
3260
|
+
daemonset,
|
|
3261
|
+
ownedPods
|
|
3262
|
+
}) => {
|
|
3263
|
+
const podNamesWithErrors = useContext(PodNamesWithErrorsContext);
|
|
3264
|
+
const podsWithErrors = ownedPods.filter(
|
|
3265
|
+
(p) => {
|
|
3266
|
+
var _a, _b;
|
|
3267
|
+
return podNamesWithErrors.has((_b = (_a = p.metadata) == null ? void 0 : _a.name) != null ? _b : "");
|
|
3268
|
+
}
|
|
3269
|
+
);
|
|
3270
|
+
return /* @__PURE__ */ React__default.createElement(Accordion, { TransitionProps: { unmountOnExit: true }, variant: "outlined" }, /* @__PURE__ */ React__default.createElement(AccordionSummary, { expandIcon: /* @__PURE__ */ React__default.createElement(ExpandMoreIcon, null) }, /* @__PURE__ */ React__default.createElement(
|
|
3271
|
+
DaemonSetSummary,
|
|
3272
|
+
{
|
|
3273
|
+
daemonset,
|
|
3274
|
+
numberOfCurrentPods: ownedPods.length,
|
|
3275
|
+
numberOfPodsWithErrors: podsWithErrors.length
|
|
3276
|
+
}
|
|
3277
|
+
)), /* @__PURE__ */ React__default.createElement(AccordionDetails, null, /* @__PURE__ */ React__default.createElement(
|
|
3278
|
+
PodsTable,
|
|
3279
|
+
{
|
|
3280
|
+
pods: ownedPods,
|
|
3281
|
+
extraColumns: [READY_COLUMNS, RESOURCE_COLUMNS]
|
|
3282
|
+
}
|
|
3283
|
+
)));
|
|
3284
|
+
};
|
|
3285
|
+
const DaemonSetsAccordions = ({}) => {
|
|
3286
|
+
const groupedResponses = useContext(GroupedResponsesContext);
|
|
3287
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
3288
|
+
Grid,
|
|
3289
|
+
{
|
|
3290
|
+
container: true,
|
|
3291
|
+
direction: "column",
|
|
3292
|
+
justifyContent: "flex-start",
|
|
3293
|
+
alignItems: "flex-start"
|
|
3294
|
+
},
|
|
3295
|
+
groupedResponses.daemonSets.map((daemonset, i) => /* @__PURE__ */ React__default.createElement(Grid, { container: true, item: true, key: i, xs: true }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: true }, /* @__PURE__ */ React__default.createElement(
|
|
3296
|
+
DaemonSetAccordion,
|
|
3297
|
+
{
|
|
3298
|
+
ownedPods: getOwnedResources(daemonset, groupedResponses.pods),
|
|
3299
|
+
daemonset
|
|
3300
|
+
}
|
|
3301
|
+
))))
|
|
3302
|
+
);
|
|
3303
|
+
};
|
|
3304
|
+
|
|
3185
3305
|
const ClusterSummary = ({
|
|
3186
3306
|
clusterName,
|
|
3187
3307
|
totalNumberOfPods,
|
|
@@ -3236,7 +3356,7 @@ const Cluster = ({ clusterObjects, podsWithErrors }) => {
|
|
|
3236
3356
|
totalNumberOfPods: groupedResponses.pods.length,
|
|
3237
3357
|
numberOfPodsWithErrors: podsWithErrors.size
|
|
3238
3358
|
}
|
|
3239
|
-
)), /* @__PURE__ */ React__default.createElement(AccordionDetails, null, /* @__PURE__ */ React__default.createElement(Grid, { container: true, direction: "column" }, groupedResponses.customResources.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(CustomResources, null)) : void 0, groupedResponses.deployments.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(DeploymentsAccordions, null)) : void 0, groupedResponses.statefulsets.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(StatefulSetsAccordions, null)) : void 0, groupedResponses.ingresses.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(IngressesAccordions, null)) : void 0, groupedResponses.services.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(ServicesAccordions, null)) : void 0, groupedResponses.cronJobs.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(CronJobsAccordions, null)) : void 0)))))));
|
|
3359
|
+
)), /* @__PURE__ */ React__default.createElement(AccordionDetails, null, /* @__PURE__ */ React__default.createElement(Grid, { container: true, direction: "column" }, groupedResponses.customResources.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(CustomResources, null)) : void 0, groupedResponses.deployments.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(DeploymentsAccordions, null)) : void 0, groupedResponses.daemonSets.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(DaemonSetsAccordions, null)) : void 0, groupedResponses.statefulsets.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(StatefulSetsAccordions, null)) : void 0, groupedResponses.ingresses.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(IngressesAccordions, null)) : void 0, groupedResponses.services.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(ServicesAccordions, null)) : void 0, groupedResponses.cronJobs.length > 0 ? /* @__PURE__ */ React__default.createElement(Grid, { item: true }, /* @__PURE__ */ React__default.createElement(CronJobsAccordions, null)) : void 0)))))));
|
|
3240
3360
|
};
|
|
3241
3361
|
|
|
3242
3362
|
const clustersWithErrorsToErrorMessage = (clustersWithErrors) => {
|