@backstage/plugin-kubernetes 0.9.4-next.1 → 0.10.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @backstage/plugin-kubernetes
2
2
 
3
+ ## 0.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4b6d41737aad: **BREAKING**: Fixed typos in exported module attributes. Many users may see no changes, but if you have customized the plugin output, you may have to rename the following:
8
+
9
+ - Component attribute: `<ResourceUtilization totalFormated={} />` to `<ResourceUtilization totalFormatted={} />`
10
+ - Interface attribute: `DetectedError.occuranceCount` to `DetectedError.occurrenceCount`.
11
+
12
+ ### Patch Changes
13
+
14
+ - 562e34d2693f: Fix container memory limits
15
+ - Updated dependencies
16
+ - @backstage/core-components@0.13.4
17
+ - @backstage/plugin-catalog-react@1.8.1
18
+ - @backstage/core-plugin-api@1.5.3
19
+ - @backstage/catalog-model@1.4.1
20
+ - @backstage/config@1.0.8
21
+ - @backstage/errors@1.2.1
22
+ - @backstage/theme@0.4.1
23
+ - @backstage/plugin-kubernetes-common@0.6.5
24
+
3
25
  ## 0.9.4-next.1
4
26
 
5
27
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -264,7 +264,7 @@ interface DetectedError {
264
264
  message: string;
265
265
  proposedFix?: ProposedFix;
266
266
  sourceRef: ResourceRef;
267
- occuranceCount: number;
267
+ occurrenceCount: number;
268
268
  }
269
269
  type ProposedFix = LogSolution | DocsSolution | EventsSolution;
270
270
  interface ProposedFixBase {
@@ -592,14 +592,14 @@ interface ResourceUtilizationProps {
592
592
  title: string;
593
593
  usage: number | string;
594
594
  total: number | string;
595
- totalFormated: string;
595
+ totalFormatted: string;
596
596
  }
597
597
  /**
598
598
  * Context for Pod Metrics
599
599
  *
600
600
  * @public
601
601
  */
602
- declare const ResourceUtilization: ({ compressed, title, usage, total, totalFormated, }: ResourceUtilizationProps) => JSX.Element;
602
+ declare const ResourceUtilization: ({ compressed, title, usage, total, totalFormatted, }: ResourceUtilizationProps) => JSX.Element;
603
603
 
604
604
  interface KubernetesObjects {
605
605
  kubernetesObjects?: ObjectsByEntityResponse;
package/dist/index.esm.js CHANGED
@@ -768,7 +768,7 @@ const podErrorMappers = [
768
768
  kind: "Pod",
769
769
  apiGroup: "v1"
770
770
  },
771
- occuranceCount: 1
771
+ occurrenceCount: 1
772
772
  };
773
773
  });
774
774
  }
@@ -792,7 +792,7 @@ const podErrorMappers = [
792
792
  kind: "Pod",
793
793
  apiGroup: "v1"
794
794
  },
795
- occuranceCount: 1
795
+ occurrenceCount: 1
796
796
  };
797
797
  });
798
798
  }
@@ -813,7 +813,7 @@ const podErrorMappers = [
813
813
  kind: "Pod",
814
814
  apiGroup: "v1"
815
815
  },
816
- occuranceCount: cs.restartCount
816
+ occurrenceCount: cs.restartCount
817
817
  };
818
818
  });
819
819
  }
@@ -837,7 +837,7 @@ const deploymentErrorMappers = [
837
837
  kind: "Deployment",
838
838
  apiGroup: "apps/v1"
839
839
  },
840
- occuranceCount: 1
840
+ occurrenceCount: 1
841
841
  };
842
842
  });
843
843
  }
@@ -861,7 +861,7 @@ const hpaErrorMappers = [
861
861
  kind: "HorizontalPodAutoscaler",
862
862
  apiGroup: "autoscaling/v1"
863
863
  },
864
- occuranceCount: 1
864
+ occurrenceCount: 1
865
865
  }
866
866
  ];
867
867
  }
@@ -994,7 +994,7 @@ const currentToDeclaredResourceToPerc$1 = (current, resource) => {
994
994
  const bytesToMiB = (value) => {
995
995
  return `${(parseFloat(value.toString()) / 1024 / 1024).toFixed(0)}MiB`;
996
996
  };
997
- const formatMilicores = (value) => {
997
+ const formatMillicores = (value) => {
998
998
  return `${(parseFloat(value.toString()) * 1e3).toFixed(0)}m`;
999
999
  };
1000
1000
 
@@ -1021,7 +1021,7 @@ const ResourceUtilization = ({
1021
1021
  title,
1022
1022
  usage,
1023
1023
  total,
1024
- totalFormated
1024
+ totalFormatted
1025
1025
  }) => {
1026
1026
  const utilization = currentToDeclaredResourceToPerc$1(usage, total);
1027
1027
  return /* @__PURE__ */ React__default.createElement(Grid, { container: true, spacing: 0 }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(
@@ -1029,7 +1029,7 @@ const ResourceUtilization = ({
1029
1029
  {
1030
1030
  variant: compressed ? "caption" : "subtitle2"
1031
1031
  },
1032
- `${title}: ${totalFormated}`
1032
+ `${title}: ${totalFormatted}`
1033
1033
  )), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(
1034
1034
  LinearGauge,
1035
1035
  {
@@ -1118,7 +1118,7 @@ const ContainerCard = ({
1118
1118
  title: "CPU requests",
1119
1119
  usage: containerMetrics.cpuUsage.currentUsage,
1120
1120
  total: containerMetrics.cpuUsage.requestTotal,
1121
- totalFormated: formatMilicores(
1121
+ totalFormatted: formatMillicores(
1122
1122
  containerMetrics.cpuUsage.requestTotal
1123
1123
  )
1124
1124
  }
@@ -1129,7 +1129,7 @@ const ContainerCard = ({
1129
1129
  title: "CPU limits",
1130
1130
  usage: containerMetrics.cpuUsage.currentUsage,
1131
1131
  total: containerMetrics.cpuUsage.limitTotal,
1132
- totalFormated: formatMilicores(
1132
+ totalFormatted: formatMillicores(
1133
1133
  containerMetrics.cpuUsage.limitTotal
1134
1134
  )
1135
1135
  }
@@ -1140,7 +1140,7 @@ const ContainerCard = ({
1140
1140
  title: "Memory requests",
1141
1141
  usage: containerMetrics.memoryUsage.currentUsage,
1142
1142
  total: containerMetrics.memoryUsage.requestTotal,
1143
- totalFormated: bytesToMiB(
1143
+ totalFormatted: bytesToMiB(
1144
1144
  containerMetrics.memoryUsage.requestTotal
1145
1145
  )
1146
1146
  }
@@ -1151,8 +1151,8 @@ const ContainerCard = ({
1151
1151
  title: "Memory limits",
1152
1152
  usage: containerMetrics.memoryUsage.currentUsage,
1153
1153
  total: containerMetrics.memoryUsage.limitTotal,
1154
- totalFormated: bytesToMiB(
1155
- containerMetrics.memoryUsage.requestTotal
1154
+ totalFormatted: bytesToMiB(
1155
+ containerMetrics.memoryUsage.limitTotal
1156
1156
  )
1157
1157
  }
1158
1158
  ))))), /* @__PURE__ */ React__default.createElement(CardActions, { disableSpacing: true }, /* @__PURE__ */ React__default.createElement(
@@ -2079,7 +2079,7 @@ const PodDrawer = ({ podAndErrors, open }) => {
2079
2079
  title: "CPU requests",
2080
2080
  usage: podMetrics.cpu.currentUsage,
2081
2081
  total: podMetrics.cpu.requestTotal,
2082
- totalFormated: formatMilicores(podMetrics.cpu.requestTotal)
2082
+ totalFormatted: formatMillicores(podMetrics.cpu.requestTotal)
2083
2083
  }
2084
2084
  ), /* @__PURE__ */ React__default.createElement(
2085
2085
  ResourceUtilization,
@@ -2087,7 +2087,7 @@ const PodDrawer = ({ podAndErrors, open }) => {
2087
2087
  title: "CPU limits",
2088
2088
  usage: podMetrics.cpu.currentUsage,
2089
2089
  total: podMetrics.cpu.limitTotal,
2090
- totalFormated: formatMilicores(podMetrics.cpu.limitTotal)
2090
+ totalFormatted: formatMillicores(podMetrics.cpu.limitTotal)
2091
2091
  }
2092
2092
  )), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React__default.createElement(
2093
2093
  ResourceUtilization,
@@ -2095,7 +2095,7 @@ const PodDrawer = ({ podAndErrors, open }) => {
2095
2095
  title: "Memory requests",
2096
2096
  usage: podMetrics.memory.currentUsage,
2097
2097
  total: podMetrics.memory.requestTotal,
2098
- totalFormated: bytesToMiB(podMetrics.memory.requestTotal)
2098
+ totalFormatted: bytesToMiB(podMetrics.memory.requestTotal)
2099
2099
  }
2100
2100
  ), /* @__PURE__ */ React__default.createElement(
2101
2101
  ResourceUtilization,
@@ -2103,7 +2103,7 @@ const PodDrawer = ({ podAndErrors, open }) => {
2103
2103
  title: "Memory limits",
2104
2104
  usage: podMetrics.memory.currentUsage,
2105
2105
  total: podMetrics.memory.limitTotal,
2106
- totalFormated: bytesToMiB(podMetrics.memory.requestTotal)
2106
+ totalFormatted: bytesToMiB(podMetrics.memory.requestTotal)
2107
2107
  }
2108
2108
  ))), ((_e = podAndErrors.pod.status) == null ? void 0 : _e.phase) === "Pending" && /* @__PURE__ */ React__default.createElement(PendingPodContent, { pod: podAndErrors.pod }), ((_g = (_f = podAndErrors.pod.status) == null ? void 0 : _f.containerStatuses) == null ? void 0 : _g.length) && /* @__PURE__ */ React__default.createElement(Grid, { container: true, spacing: 2 }, /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(Typography, { variant: "h5" }, "Containers")), /* @__PURE__ */ React__default.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React__default.createElement(ItemCardGrid, null, (_i = (_h = podAndErrors.pod.status) == null ? void 0 : _h.containerStatuses) == null ? void 0 : _i.map(
2109
2109
  (containerStatus, i) => {
@@ -2216,11 +2216,11 @@ const podStatusToCpuUtil = (podStatus) => {
2216
2216
  value: `requests: ${currentToDeclaredResourceToPerc(
2217
2217
  currentUsage,
2218
2218
  cpuUtil.requestTotal
2219
- )} of ${formatMilicores(cpuUtil.requestTotal)}`,
2219
+ )} of ${formatMillicores(cpuUtil.requestTotal)}`,
2220
2220
  subvalue: `limits: ${currentToDeclaredResourceToPerc(
2221
2221
  currentUsage,
2222
2222
  cpuUtil.limitTotal
2223
- )} of ${formatMilicores(cpuUtil.limitTotal)}`
2223
+ )} of ${formatMillicores(cpuUtil.limitTotal)}`
2224
2224
  }
2225
2225
  );
2226
2226
  };