@backstage/plugin-kubernetes-react 0.4.5-next.0 → 0.5.0-next.1
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 +16 -0
- package/dist/utils/owner.esm.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-react
|
|
2
2
|
|
|
3
|
+
## 0.5.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 71b8704: Bumping @kubernetes/client-node to 1.0.0-rc7 to mitigate CVEs related to the request and tough-cookie packages
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/plugin-kubernetes-common@0.9.0-next.0
|
|
13
|
+
- @backstage/catalog-model@1.7.0
|
|
14
|
+
- @backstage/core-components@0.16.0-next.1
|
|
15
|
+
- @backstage/core-plugin-api@1.10.0
|
|
16
|
+
- @backstage/errors@1.2.4
|
|
17
|
+
- @backstage/types@1.1.1
|
|
18
|
+
|
|
3
19
|
## 0.4.5-next.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner.esm.js","sources":["../../src/utils/owner.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"owner.esm.js","sources":["../../src/utils/owner.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n V1ObjectMeta,\n V2HorizontalPodAutoscaler,\n V1Pod,\n V1ReplicaSet,\n} from '@kubernetes/client-node';\n\ninterface CanOwn {\n metadata?: V1ObjectMeta;\n}\n\ninterface CanBeOwned {\n metadata?: V1ObjectMeta;\n}\n\nexport function getOwnedResources<R extends CanBeOwned>(\n potentialOwner: CanOwn,\n possiblyOwned: R[],\n): R[] {\n return possiblyOwned.filter(\n p =>\n p.metadata?.ownerReferences?.some(\n o => o.uid === potentialOwner.metadata?.uid,\n ) ?? false,\n );\n}\n\nexport const getOwnedPodsThroughReplicaSets = (\n potentialOwner: CanOwn,\n replicaSets: V1ReplicaSet[],\n pods: V1Pod[],\n) => {\n return getOwnedResources(\n potentialOwner,\n replicaSets.filter(rs => rs.status && rs.status.replicas > 0),\n ).reduce((accum, rs) => {\n return accum.concat(getOwnedResources(rs, pods));\n }, [] as V1Pod[]);\n};\n\ninterface ResourceRef {\n kind: string;\n namespace?: string;\n name?: string;\n}\n\nexport const getMatchingHpa = (\n owner: ResourceRef,\n hpas: V2HorizontalPodAutoscaler[],\n): V2HorizontalPodAutoscaler | undefined => {\n return hpas.find(hpa => {\n return (\n (hpa.spec?.scaleTargetRef?.kind ?? '').toLocaleLowerCase('en-US') ===\n owner.kind.toLocaleLowerCase('en-US') &&\n (hpa.metadata?.namespace ?? '') ===\n (owner.namespace ?? 'unknown-namespace') &&\n (hpa.spec?.scaleTargetRef?.name ?? '') ===\n (owner.name ?? 'unknown-deployment')\n );\n });\n};\n"],"names":[],"m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;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-kubernetes-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-next.1",
|
|
4
4
|
"description": "Web library for the kubernetes-react plugin",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@backstage/catalog-model": "1.7.0",
|
|
45
|
-
"@backstage/core-components": "0.16.0-next.
|
|
45
|
+
"@backstage/core-components": "0.16.0-next.1",
|
|
46
46
|
"@backstage/core-plugin-api": "1.10.0",
|
|
47
47
|
"@backstage/errors": "1.2.4",
|
|
48
|
-
"@backstage/plugin-kubernetes-common": "0.
|
|
48
|
+
"@backstage/plugin-kubernetes-common": "0.9.0-next.0",
|
|
49
49
|
"@backstage/types": "1.1.1",
|
|
50
50
|
"@kubernetes-models/apimachinery": "^2.0.0",
|
|
51
51
|
"@kubernetes-models/base": "^5.0.0",
|
|
52
|
-
"@kubernetes/client-node": "
|
|
52
|
+
"@kubernetes/client-node": "1.0.0-rc7",
|
|
53
53
|
"@material-ui/core": "^4.9.13",
|
|
54
54
|
"@material-ui/icons": "^4.11.3",
|
|
55
55
|
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"xterm-addon-fit": "^0.8.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@backstage/cli": "0.29.0-next.
|
|
67
|
+
"@backstage/cli": "0.29.0-next.1",
|
|
68
68
|
"@backstage/core-app-api": "1.15.1",
|
|
69
|
-
"@backstage/test-utils": "1.7.0",
|
|
69
|
+
"@backstage/test-utils": "1.7.1-next.0",
|
|
70
70
|
"@testing-library/jest-dom": "^6.0.0",
|
|
71
71
|
"@testing-library/react": "^16.0.0",
|
|
72
72
|
"@types/react": "^18.0.0",
|