@backstage-community/plugin-scaffolder-backend-module-kubernetes 2.2.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 ADDED
@@ -0,0 +1,356 @@
1
+ ### Dependencies
2
+
3
+ ## 2.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 599be1e: The [scaffolder-backend-module-kubernetes](https://github.com/janus-idp/backstage-plugins/tree/main/plugins/kubernetes-actions) plugin from the [janus-idp/backstage-plugins](https://github.com/janus-idp/backstage-plugins) repository was migrated to the [community plugins](https://github.com/backstage/community-plugins), based on commit `9671df5d`.
8
+
9
+ The migration was performed by following the manual migration steps outlined in the [Community Plugins CONTRIBUTING guide](https://github.com/backstage/community-plugins/blob/main/CONTRIBUTING.md#migrating-a-plugin).
10
+
11
+ ## 2.2.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 0e6bfd3: feat: update Backstage to the latest version
16
+
17
+ Update to Backstage 1.32.5
18
+
19
+ ## 2.2.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 8244f28: chore(deps): update to backstage 1.32
24
+
25
+ ## 2.1.2
26
+
27
+ ### Patch Changes
28
+
29
+ - 7342e9b: chore: remove @janus-idp/cli dep and relink local packages
30
+
31
+ This update removes `@janus-idp/cli` from all plugins, as it’s no longer necessary. Additionally, packages are now correctly linked with a specified version.
32
+
33
+ ## 2.1.1
34
+
35
+ ### Patch Changes
36
+
37
+ - ffe2546: Fix CVE-2024-21534 by upgrading @kubernetes/client-node package to 0.22.1
38
+
39
+ ## 2.1.0
40
+
41
+ ### Minor Changes
42
+
43
+ - d9551ae: feat(deps): update to backstage 1.31
44
+
45
+ ### Patch Changes
46
+
47
+ - d9551ae: Change local package references to a `*`
48
+ - d9551ae: pin the @janus-idp/cli package
49
+ - d9551ae: upgrade to yarn v3
50
+ - d9551ae: Change the export-dynamic script to no longer use any flags and remove the tracking of the dist-dynamic folder
51
+
52
+ * **@janus-idp/cli:** upgraded to 1.15.2
53
+
54
+ ### Dependencies
55
+
56
+ - **@janus-idp/cli:** upgraded to 1.15.1
57
+
58
+ ### Dependencies
59
+
60
+ - **@janus-idp/cli:** upgraded to 1.15.0
61
+
62
+ ### Dependencies
63
+
64
+ - **@janus-idp/cli:** upgraded to 1.14.0
65
+
66
+ ### Dependencies
67
+
68
+ - **@janus-idp/cli:** upgraded to 1.13.2
69
+
70
+ ### Dependencies
71
+
72
+ - **@janus-idp/cli:** upgraded to 1.13.1
73
+
74
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.7.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.6.0...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.7.0) (2024-07-26)
75
+
76
+ ### Features
77
+
78
+ - **deps:** update to backstage 1.29 ([#1900](https://github.com/janus-idp/backstage-plugins/issues/1900)) ([f53677f](https://github.com/janus-idp/backstage-plugins/commit/f53677fb02d6df43a9de98c43a9f101a6db76802))
79
+
80
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.6.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.5.2...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.6.0) (2024-07-24)
81
+
82
+ ### Features
83
+
84
+ - **deps:** update to backstage 1.28 ([#1891](https://github.com/janus-idp/backstage-plugins/issues/1891)) ([1ba1108](https://github.com/janus-idp/backstage-plugins/commit/1ba11088e0de60e90d138944267b83600dc446e5))
85
+
86
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.5.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.5.1...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.5.2) (2024-06-25)
87
+
88
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.5.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.5.0...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.5.1) (2024-06-19)
89
+
90
+ ### Dependencies
91
+
92
+ - **@janus-idp/cli:** upgraded to 1.11.1
93
+
94
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.5.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.14...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.5.0) (2024-06-13)
95
+
96
+ ### Features
97
+
98
+ - **deps:** update to backstage 1.27 ([#1683](https://github.com/janus-idp/backstage-plugins/issues/1683)) ([a14869c](https://github.com/janus-idp/backstage-plugins/commit/a14869c3f4177049cb8d6552b36c3ffd17e7997d))
99
+
100
+ ### Dependencies
101
+
102
+ - **@janus-idp/cli:** upgraded to 1.11.0
103
+
104
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.14](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.13...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.14) (2024-06-13)
105
+
106
+ ### Bug Fixes
107
+
108
+ - missing postversion script is several plugins and missing turbo dependency ([#1811](https://github.com/janus-idp/backstage-plugins/issues/1811)) ([4dfe4f5](https://github.com/janus-idp/backstage-plugins/commit/4dfe4f533e21e79c928c66bfd68684243912be2c))
109
+
110
+ ### Dependencies
111
+
112
+ - **@janus-idp/cli:** upgraded to 1.10.1
113
+
114
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.13](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.12...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.13) (2024-06-05)
115
+
116
+ ### Dependencies
117
+
118
+ - **@janus-idp/cli:** upgraded to 1.10.0
119
+
120
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.12](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.11...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.12) (2024-06-04)
121
+
122
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.11](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.10...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.11) (2024-06-03)
123
+
124
+ ### Dependencies
125
+
126
+ - **@janus-idp/cli:** upgraded to 1.9.0
127
+
128
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.10](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.9...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.10) (2024-05-29)
129
+
130
+ ### Dependencies
131
+
132
+ - **@janus-idp/cli:** upgraded to 1.8.10
133
+
134
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.9](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.8...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.9) (2024-05-29)
135
+
136
+ ### Dependencies
137
+
138
+ - **@janus-idp/cli:** upgraded to 1.8.9
139
+
140
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.8](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.7...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.8) (2024-05-17)
141
+
142
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.7](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.6...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.7) (2024-05-16)
143
+
144
+ ### Dependencies
145
+
146
+ - **@janus-idp/cli:** upgraded to 1.8.7
147
+
148
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.6](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.5...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.6) (2024-05-09)
149
+
150
+ ### Dependencies
151
+
152
+ - **@janus-idp/cli:** upgraded to 1.8.6
153
+
154
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.5](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.4...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.5) (2024-05-02)
155
+
156
+ ### Dependencies
157
+
158
+ - **@janus-idp/cli:** upgraded to 1.8.5
159
+
160
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.4](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.3...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.4) (2024-05-02)
161
+
162
+ ### Dependencies
163
+
164
+ - **@janus-idp/cli:** upgraded to 1.8.4
165
+
166
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.3](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.2...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.3) (2024-04-30)
167
+
168
+ ### Dependencies
169
+
170
+ - **@janus-idp/cli:** upgraded to 1.8.3
171
+
172
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.1...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.2) (2024-04-30)
173
+
174
+ ### Dependencies
175
+
176
+ - **@janus-idp/cli:** upgraded to 1.8.2
177
+
178
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.0...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.1) (2024-04-25)
179
+
180
+ ### Dependencies
181
+
182
+ - **@janus-idp/cli:** upgraded to 1.8.1
183
+
184
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.4.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.11...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.4.0) (2024-04-15)
185
+
186
+ ### Features
187
+
188
+ - checkPluginVersion.sh bump plugins for 1.2.0 release ([#1511](https://github.com/janus-idp/backstage-plugins/issues/1511)) ([73c6588](https://github.com/janus-idp/backstage-plugins/commit/73c6588adb7e8c20907b06f2a8ef248cfd4332e4))
189
+
190
+ ### Dependencies
191
+
192
+ - **@janus-idp/cli:** upgraded to 1.8.0
193
+
194
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.11](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.10...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.11) (2024-04-09)
195
+
196
+ ### Dependencies
197
+
198
+ - **@janus-idp/cli:** upgraded to 1.7.10
199
+
200
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.10](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.9...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.10) (2024-04-09)
201
+
202
+ ### Dependencies
203
+
204
+ - **@janus-idp/cli:** upgraded to 1.7.9
205
+
206
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.9](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.8...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.9) (2024-04-05)
207
+
208
+ ### Dependencies
209
+
210
+ - **@janus-idp/cli:** upgraded to 1.7.8
211
+
212
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.8](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.7...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.8) (2024-04-02)
213
+
214
+ ### Dependencies
215
+
216
+ - **@janus-idp/cli:** upgraded to 1.7.7
217
+
218
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.7](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.6...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.7) (2024-03-29)
219
+
220
+ ### Dependencies
221
+
222
+ - **@janus-idp/cli:** upgraded to 1.7.6
223
+
224
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.6](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.5...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.6) (2024-03-11)
225
+
226
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.5](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.4...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.5) (2024-03-04)
227
+
228
+ ### Dependencies
229
+
230
+ - **@janus-idp/cli:** upgraded to 1.7.5
231
+
232
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.4](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.3...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.4) (2024-02-27)
233
+
234
+ ### Dependencies
235
+
236
+ - **@janus-idp/cli:** upgraded to 1.7.4
237
+
238
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.3](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.2...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.3) (2024-02-26)
239
+
240
+ ### Dependencies
241
+
242
+ - **@janus-idp/cli:** upgraded to 1.7.3
243
+
244
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.1...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.2) (2024-02-21)
245
+
246
+ ### Bug Fixes
247
+
248
+ - **kubernetes-actions:** support adding labels while creating namespace ([#1223](https://github.com/janus-idp/backstage-plugins/issues/1223)) ([2b266bc](https://github.com/janus-idp/backstage-plugins/commit/2b266bc123e3446c18bdaa0dda34fe7e53b16404))
249
+
250
+ ### Dependencies
251
+
252
+ - **@janus-idp/cli:** upgraded to 1.7.2
253
+
254
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.0...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.1) (2024-02-05)
255
+
256
+ ### Dependencies
257
+
258
+ - **@janus-idp/cli:** upgraded to 1.7.1
259
+
260
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.3.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.7...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.3.0) (2024-01-30)
261
+
262
+ ### Features
263
+
264
+ - add new backend system support for existing backend plugins that have not been migrated over yet ([#1132](https://github.com/janus-idp/backstage-plugins/issues/1132)) ([06e16fd](https://github.com/janus-idp/backstage-plugins/commit/06e16fdcf64257dd08297cb727445d9a8a23c522))
265
+
266
+ ### Dependencies
267
+
268
+ - **@janus-idp/cli:** upgraded to 1.7.0
269
+
270
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.7](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.6...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.7) (2024-01-25)
271
+
272
+ ### Dependencies
273
+
274
+ - **@janus-idp/cli:** upgraded to 1.6.0
275
+
276
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.6](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.5...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.6) (2024-01-16)
277
+
278
+ ### Dependencies
279
+
280
+ - **@janus-idp/cli:** upgraded to 1.5.0
281
+
282
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.5](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.4...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.5) (2023-12-07)
283
+
284
+ ### Bug Fixes
285
+
286
+ - attempt to force a bump of backend plugins ([#1007](https://github.com/janus-idp/backstage-plugins/issues/1007)) ([7a37225](https://github.com/janus-idp/backstage-plugins/commit/7a372254fb7e8107aa794f7900a6511eee096677))
287
+
288
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.4](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.3...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.4) (2023-12-07)
289
+
290
+ ### Dependencies
291
+
292
+ - **@janus-idp/cli:** upgraded to 1.4.7
293
+
294
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.3](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.2...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.3) (2023-11-30)
295
+
296
+ ### Dependencies
297
+
298
+ - **@janus-idp/cli:** upgraded to 1.4.6
299
+
300
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.1...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.2) (2023-11-22)
301
+
302
+ ### Dependencies
303
+
304
+ - **@janus-idp/cli:** upgraded to 1.4.5
305
+
306
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.0...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.1) (2023-11-21)
307
+
308
+ ### Bug Fixes
309
+
310
+ - sync versions in dynamic assets and publish derived packages as additional packages ([#963](https://github.com/janus-idp/backstage-plugins/issues/963)) ([7d0a386](https://github.com/janus-idp/backstage-plugins/commit/7d0a38609b4a18b54c75378a150e8b5c3ba8ff43))
311
+
312
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.2.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.1.2...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.2.0) (2023-11-21)
313
+
314
+ ### Features
315
+
316
+ - make all backend plugins dynamic ([#954](https://github.com/janus-idp/backstage-plugins/issues/954)) ([1b4338a](https://github.com/janus-idp/backstage-plugins/commit/1b4338a45c3b92f5607391b2bfc17c4d29050ce3))
317
+
318
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.1.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.1.1...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.1.2) (2023-10-19)
319
+
320
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.1.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.1.0...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.1.1) (2023-08-30)
321
+
322
+ ### Bug Fixes
323
+
324
+ - **kubernetes-actions:** fix code smells ([#686](https://github.com/janus-idp/backstage-plugins/issues/686)) ([ea58682](https://github.com/janus-idp/backstage-plugins/commit/ea5868235af3d1e7163ecc5f7c81b91cb08fcd43))
325
+
326
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.1.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.4...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.1.0) (2023-08-14)
327
+
328
+ ### Features
329
+
330
+ - **ts:** transpile each plugin separately ([#634](https://github.com/janus-idp/backstage-plugins/issues/634)) ([b94c4dc](https://github.com/janus-idp/backstage-plugins/commit/b94c4dc50ada328e5ce1bed5fb7c76f64607e1ee))
331
+
332
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.0.4](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.3...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.4) (2023-07-25)
333
+
334
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.0.3](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.2...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.3) (2023-06-14)
335
+
336
+ ### Documentation
337
+
338
+ - update plugin README formatting ([#396](https://github.com/janus-idp/backstage-plugins/issues/396)) ([9b39056](https://github.com/janus-idp/backstage-plugins/commit/9b39056f6c66e9a6a0a5d0c4059420dff66db263)), closes [#295](https://github.com/janus-idp/backstage-plugins/issues/295) [#369](https://github.com/janus-idp/backstage-plugins/issues/369) [#295](https://github.com/janus-idp/backstage-plugins/issues/295) [#369](https://github.com/janus-idp/backstage-plugins/issues/369)
339
+
340
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.0.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.1...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.2) (2023-06-08)
341
+
342
+ ### Bug Fixes
343
+
344
+ - **monorepo:** update test script ([#436](https://github.com/janus-idp/backstage-plugins/issues/436)) ([0f1f3ff](https://github.com/janus-idp/backstage-plugins/commit/0f1f3ff25176225076a112f90412d5dcd6f28a75))
345
+
346
+ ### Other changes
347
+
348
+ - reorder imports via prettier ([#419](https://github.com/janus-idp/backstage-plugins/issues/419)) ([17f1e6a](https://github.com/janus-idp/backstage-plugins/commit/17f1e6a689bd793a619ec5e42e5cdda0998f78a5))
349
+
350
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes [1.0.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.0...@janus-idp/backstage-scaffolder-backend-module-kubernetes@1.0.1) (2023-05-31)
351
+
352
+ ## @janus-idp/backstage-scaffolder-backend-module-kubernetes 1.0.0 (2023-05-31)
353
+
354
+ ### Features
355
+
356
+ - **k8s-actions:** add create namespace action ([#292](https://github.com/janus-idp/backstage-plugins/issues/292)) ([00ef86f](https://github.com/janus-idp/backstage-plugins/commit/00ef86f0dcc9dec3bc7e2939827459c57b576859))
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # Kubernetes actions for Backstage
2
+
3
+ This module provides [Backstage](https://backstage.io/) template [actions](https://backstage.io/docs/features/software-templates/builtin-actions) for [Kubernetes](https://kubernetes.io/docs/home/).
4
+
5
+ The following actions are currently supported in this module:
6
+
7
+ - Create a kubernetes namespace
8
+
9
+ ## Installation
10
+
11
+ Run the following command to install the action package in your Backstage project
12
+
13
+ ```bash
14
+ yarn workspace backend add @backstage-community/plugin-scaffolder-backend-module-kubernetes
15
+ ```
16
+
17
+ ### Installing the action on the backend
18
+
19
+ Add the following to your `packages/backend/src/index.ts` file:
20
+
21
+ ```ts title="packages/backend/src/index.ts"
22
+ const backend = createBackend();
23
+
24
+ // Add the following line
25
+ backend.add(
26
+ import('@backstage-community/plugin-scaffolder-backend-module-kubernetes'),
27
+ );
28
+
29
+ backend.start();
30
+ ```
31
+
32
+ ## Configuration
33
+
34
+ Add the Kubernetes actions to your templates, see the [example](./examples/templates/01-kubernetes-template.yaml) file in this repository for complete usage examples
35
+
36
+ ```yaml
37
+ action: kubernetes:create-namespace
38
+ id: create-kubernetes-namespace
39
+ name: Create kubernetes namespace
40
+ input:
41
+ namespace: foo
42
+ clusterRef: bar
43
+ token: TOKEN
44
+ skipTLSVerify: false
45
+ caData: Zm9v
46
+ labels: app.io/type=ns; app.io/managed-by=org;
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ ### Action: kubernetes:create-namespace
52
+
53
+ #### Input
54
+
55
+ | Parameter Name | Type | Required | Description | Example |
56
+ | -------------- | :-----: | :------: | --------------------------------------------------- | -------------------------------------- |
57
+ | namespace | string | Yes | Kubernetes namespace name | foo |
58
+ | clusterRef | string | No | Cluster resource entity reference from the catalog | bar |
59
+ | url | string | No | API url of the kubernetes cluster | <https://api.foo.redhat.com:6443> |
60
+ | token | string | No | Kubernetes API bearer token used for authentication | |
61
+ | skipTLSVerify | boolean | No | If true, certificate verification is skipped | false |
62
+ | caData | string | No | Base64 encoded certificate data | |
63
+ | label | string | No | Labels that will be applied to the namespace | app.io/type=ns; app.io/managed-by=org; |
64
+
65
+ #### Output
66
+
67
+ This action doesn't have any outputs.
@@ -0,0 +1,185 @@
1
+ 'use strict';
2
+
3
+ var pluginScaffolderNode = require('@backstage/plugin-scaffolder-node');
4
+ var clientNode = require('@kubernetes/client-node');
5
+
6
+ const KUBERNETES_API_URL_ANNOTATION = "kubernetes.io/api-server";
7
+ const KUBERNETES_CLUSTER_TYPE = "kubernetes-cluster";
8
+ const getUrlFromClusterRef = async (ctx, catalogClient, clusterRef) => {
9
+ const isResource = clusterRef.startsWith("resource:");
10
+ if (!isResource) {
11
+ ctx.logger.warn(
12
+ "Cluster reference in the wrong format, attempting to fix it"
13
+ );
14
+ }
15
+ const catalogEntity = await catalogClient.getEntityByRef(
16
+ isResource ? clusterRef : `resource:${clusterRef}`
17
+ );
18
+ if (!catalogEntity) {
19
+ throw new Error("Resource not found");
20
+ }
21
+ if (catalogEntity.spec?.type !== KUBERNETES_CLUSTER_TYPE) {
22
+ ctx.logger.warn(`Resource is not of ${KUBERNETES_CLUSTER_TYPE} type`);
23
+ }
24
+ const apiUrl = catalogEntity.metadata?.annotations?.[KUBERNETES_API_URL_ANNOTATION];
25
+ if (!apiUrl) {
26
+ throw new Error(
27
+ `Cluster resource is missing ${KUBERNETES_API_URL_ANNOTATION} annotation`
28
+ );
29
+ }
30
+ return apiUrl;
31
+ };
32
+ const validateUrl = (url = "") => {
33
+ try {
34
+ new URL(url);
35
+ } catch (error) {
36
+ throw new Error(`"${url}" is an invalid url`);
37
+ }
38
+ };
39
+ const convertLabelsToObject = (labelsString) => {
40
+ const result = {};
41
+ if (!labelsString || labelsString.indexOf("=") === -1) {
42
+ console.error(
43
+ "Invalid label string. Label string must contain at least one label separated by '=' character."
44
+ );
45
+ return result;
46
+ }
47
+ const labelsArray = labelsString.split(";");
48
+ labelsArray.forEach((label) => {
49
+ const separatorIndex = label.indexOf("=");
50
+ if (separatorIndex !== -1) {
51
+ const key = label.slice(0, separatorIndex).trim();
52
+ const value = label.slice(separatorIndex + 1).trim();
53
+ if (key && value) {
54
+ result[key] = value;
55
+ }
56
+ } else {
57
+ console.error(
58
+ `Invalid label: '${label}'. Label must contain at least one '=' character.`
59
+ );
60
+ }
61
+ });
62
+ return result;
63
+ };
64
+ function createKubernetesNamespaceAction(catalogClient) {
65
+ return pluginScaffolderNode.createTemplateAction({
66
+ id: "kubernetes:create-namespace",
67
+ description: "Creates a kubernetes namespace",
68
+ schema: {
69
+ input: {
70
+ type: "object",
71
+ oneOf: [
72
+ { required: ["namespace", "token", "url"] },
73
+ { required: ["namespace", "token", "clusterRef"] }
74
+ ],
75
+ properties: {
76
+ namespace: {
77
+ title: "Namespace name",
78
+ description: "Name of the namespace to be created",
79
+ type: "string"
80
+ },
81
+ clusterRef: {
82
+ title: "Cluster entity reference",
83
+ description: "Cluster resource entity reference from the catalog",
84
+ type: "string"
85
+ },
86
+ url: {
87
+ title: "Url",
88
+ description: "Url of the kubernetes API, will be used if clusterRef is not provided",
89
+ type: "string"
90
+ },
91
+ token: {
92
+ title: "Token",
93
+ description: "Bearer token to authenticate with",
94
+ type: "string"
95
+ },
96
+ skipTLSVerify: {
97
+ title: "Skip TLS verification",
98
+ description: "Skip TLS certificate verification, not recommended to use in production environment, defaults to false",
99
+ type: "boolean"
100
+ },
101
+ caData: {
102
+ title: "CA Data",
103
+ description: "Certificate Authority base64 encoded certificate",
104
+ type: "string"
105
+ },
106
+ labels: {
107
+ title: "Labels",
108
+ description: "Labels that will be applied to the namespace.",
109
+ type: "string"
110
+ }
111
+ }
112
+ }
113
+ },
114
+ async handler(ctx) {
115
+ const {
116
+ namespace,
117
+ clusterRef,
118
+ token,
119
+ url,
120
+ skipTLSVerify,
121
+ caData,
122
+ labels
123
+ } = ctx.input;
124
+ const kubeConfig = new clientNode.KubeConfig();
125
+ const name = "backstage";
126
+ const cluster = {
127
+ server: "",
128
+ name,
129
+ serviceAccountToken: token,
130
+ skipTLSVerify: skipTLSVerify || false,
131
+ caData
132
+ };
133
+ if (clusterRef && url) {
134
+ throw new Error(
135
+ "Cluster reference and url can't be specified at the same time"
136
+ );
137
+ }
138
+ if (!clusterRef && !url) {
139
+ throw new Error("Cluster reference or url are required");
140
+ }
141
+ if (clusterRef) {
142
+ cluster.server = await getUrlFromClusterRef(
143
+ ctx,
144
+ catalogClient,
145
+ clusterRef
146
+ );
147
+ } else {
148
+ validateUrl(url);
149
+ cluster.server = url;
150
+ }
151
+ kubeConfig.loadFromOptions({
152
+ clusters: [cluster],
153
+ users: [{ name, token }],
154
+ contexts: [
155
+ {
156
+ name,
157
+ user: name,
158
+ cluster: name
159
+ }
160
+ ],
161
+ currentContext: name
162
+ });
163
+ const namespaceLabels = convertLabelsToObject(labels);
164
+ const api = kubeConfig.makeApiClient(clientNode.CoreV1Api);
165
+ const k8sNamespace = {
166
+ metadata: {
167
+ name: namespace,
168
+ labels: namespaceLabels
169
+ }
170
+ };
171
+ await api.createNamespace(k8sNamespace).catch((e) => {
172
+ const errorBody = e.body;
173
+ const statusCode = errorBody?.code || e.statusCode;
174
+ const message = errorBody?.message || e.message;
175
+ throw new Error(
176
+ `Failed to create kubernetes namespace, ${statusCode} -- ${message}`
177
+ );
178
+ });
179
+ }
180
+ });
181
+ }
182
+
183
+ exports.convertLabelsToObject = convertLabelsToObject;
184
+ exports.createKubernetesNamespaceAction = createKubernetesNamespaceAction;
185
+ //# sourceMappingURL=createKubernetesNamespace.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createKubernetesNamespace.cjs.js","sources":["../../src/actions/createKubernetesNamespace.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { CatalogClient } from '@backstage/catalog-client';\nimport type { Entity } from '@backstage/catalog-model';\nimport {\n createTemplateAction,\n type ActionContext,\n} from '@backstage/plugin-scaffolder-node';\n\nimport {\n CoreV1Api,\n KubeConfig,\n V1Namespace,\n type HttpError,\n} from '@kubernetes/client-node';\n\nconst KUBERNETES_API_URL_ANNOTATION = 'kubernetes.io/api-server';\nconst KUBERNETES_CLUSTER_TYPE = 'kubernetes-cluster';\n\nexport interface HttpErrorBody {\n kind: string;\n apiVersion: string;\n metadata: Object;\n status: string;\n message: string;\n reason: string;\n details: { name: string; kind: string };\n code: number;\n}\n\ntype TemplateActionParameters = {\n namespace: string;\n clusterRef?: string;\n url?: string;\n token: string;\n skipTLSVerify?: boolean;\n caData?: string;\n labels?: string;\n};\n\nconst getUrlFromClusterRef = async (\n ctx: ActionContext<TemplateActionParameters>,\n catalogClient: CatalogClient,\n clusterRef: string,\n): Promise<string> => {\n const isResource = clusterRef.startsWith('resource:');\n if (!isResource) {\n ctx.logger.warn(\n 'Cluster reference in the wrong format, attempting to fix it',\n );\n }\n const catalogEntity: Entity | undefined = await catalogClient.getEntityByRef(\n isResource ? clusterRef : `resource:${clusterRef}`,\n );\n if (!catalogEntity) {\n throw new Error('Resource not found');\n }\n if (catalogEntity.spec?.type !== KUBERNETES_CLUSTER_TYPE) {\n ctx.logger.warn(`Resource is not of ${KUBERNETES_CLUSTER_TYPE} type`);\n }\n const apiUrl =\n catalogEntity.metadata?.annotations?.[KUBERNETES_API_URL_ANNOTATION];\n if (!apiUrl) {\n throw new Error(\n `Cluster resource is missing ${KUBERNETES_API_URL_ANNOTATION} annotation`,\n );\n }\n return apiUrl;\n};\n\nconst validateUrl = (url: string | undefined = '') => {\n try {\n // eslint-disable-next-line no-new\n new URL(url);\n } catch (error) {\n throw new Error(`\"${url}\" is an invalid url`);\n }\n};\n\nexport const convertLabelsToObject = (\n labelsString: string | undefined,\n): { [key: string]: string } => {\n const result: { [key: string]: string } = {};\n\n if (!labelsString || labelsString.indexOf('=') === -1) {\n console.error(\n \"Invalid label string. Label string must contain at least one label separated by '=' character.\",\n );\n return result;\n }\n\n const labelsArray = labelsString.split(';');\n\n labelsArray.forEach(label => {\n const separatorIndex = label.indexOf('=');\n if (separatorIndex !== -1) {\n const key = label.slice(0, separatorIndex).trim();\n const value = label.slice(separatorIndex + 1).trim();\n if (key && value) {\n result[key] = value;\n }\n } else {\n console.error(\n `Invalid label: '${label}'. Label must contain at least one '=' character.`,\n );\n }\n });\n\n return result;\n};\n\nexport function createKubernetesNamespaceAction(catalogClient: CatalogClient) {\n return createTemplateAction<TemplateActionParameters>({\n id: 'kubernetes:create-namespace',\n description: 'Creates a kubernetes namespace',\n schema: {\n input: {\n type: 'object',\n oneOf: [\n { required: ['namespace', 'token', 'url'] },\n { required: ['namespace', 'token', 'clusterRef'] },\n ],\n properties: {\n namespace: {\n title: 'Namespace name',\n description: 'Name of the namespace to be created',\n type: 'string',\n },\n clusterRef: {\n title: 'Cluster entity reference',\n description: 'Cluster resource entity reference from the catalog',\n type: 'string',\n },\n url: {\n title: 'Url',\n description:\n 'Url of the kubernetes API, will be used if clusterRef is not provided',\n type: 'string',\n },\n token: {\n title: 'Token',\n description: 'Bearer token to authenticate with',\n type: 'string',\n },\n skipTLSVerify: {\n title: 'Skip TLS verification',\n description:\n 'Skip TLS certificate verification, not recommended to use in production environment, defaults to false',\n type: 'boolean',\n },\n caData: {\n title: 'CA Data',\n description: 'Certificate Authority base64 encoded certificate',\n type: 'string',\n },\n labels: {\n title: 'Labels',\n description: 'Labels that will be applied to the namespace.',\n type: 'string',\n },\n },\n },\n },\n async handler(ctx) {\n const {\n namespace,\n clusterRef,\n token,\n url,\n skipTLSVerify,\n caData,\n labels,\n } = ctx.input;\n const kubeConfig = new KubeConfig();\n const name = 'backstage';\n const cluster = {\n server: '',\n name,\n serviceAccountToken: token,\n skipTLSVerify: skipTLSVerify || false,\n caData,\n };\n\n if (clusterRef && url) {\n throw new Error(\n \"Cluster reference and url can't be specified at the same time\",\n );\n }\n\n if (!clusterRef && !url) {\n throw new Error('Cluster reference or url are required');\n }\n\n if (clusterRef) {\n cluster.server = await getUrlFromClusterRef(\n ctx,\n catalogClient,\n clusterRef,\n );\n } else {\n validateUrl(url);\n cluster.server = url!;\n }\n\n kubeConfig.loadFromOptions({\n clusters: [cluster],\n users: [{ name, token }],\n contexts: [\n {\n name,\n user: name,\n cluster: name,\n },\n ],\n currentContext: name,\n });\n\n const namespaceLabels = convertLabelsToObject(labels);\n\n const api = kubeConfig.makeApiClient(CoreV1Api);\n const k8sNamespace: V1Namespace = {\n metadata: {\n name: namespace,\n labels: namespaceLabels,\n },\n };\n await api.createNamespace(k8sNamespace).catch((e: HttpError) => {\n const errorBody = e.body as HttpErrorBody;\n const statusCode = errorBody?.code || e.statusCode;\n const message = errorBody?.message || e.message;\n throw new Error(\n `Failed to create kubernetes namespace, ${statusCode} -- ${message}`,\n );\n });\n },\n });\n}\n"],"names":["createTemplateAction","KubeConfig","CoreV1Api"],"mappings":";;;;;AA6BA,MAAM,6BAAgC,GAAA,0BAAA;AACtC,MAAM,uBAA0B,GAAA,oBAAA;AAuBhC,MAAM,oBAAuB,GAAA,OAC3B,GACA,EAAA,aAAA,EACA,UACoB,KAAA;AACpB,EAAM,MAAA,UAAA,GAAa,UAAW,CAAA,UAAA,CAAW,WAAW,CAAA;AACpD,EAAA,IAAI,CAAC,UAAY,EAAA;AACf,IAAA,GAAA,CAAI,MAAO,CAAA,IAAA;AAAA,MACT;AAAA,KACF;AAAA;AAEF,EAAM,MAAA,aAAA,GAAoC,MAAM,aAAc,CAAA,cAAA;AAAA,IAC5D,UAAA,GAAa,UAAa,GAAA,CAAA,SAAA,EAAY,UAAU,CAAA;AAAA,GAClD;AACA,EAAA,IAAI,CAAC,aAAe,EAAA;AAClB,IAAM,MAAA,IAAI,MAAM,oBAAoB,CAAA;AAAA;AAEtC,EAAI,IAAA,aAAA,CAAc,IAAM,EAAA,IAAA,KAAS,uBAAyB,EAAA;AACxD,IAAA,GAAA,CAAI,MAAO,CAAA,IAAA,CAAK,CAAsB,mBAAA,EAAA,uBAAuB,CAAO,KAAA,CAAA,CAAA;AAAA;AAEtE,EAAA,MAAM,MACJ,GAAA,aAAA,CAAc,QAAU,EAAA,WAAA,GAAc,6BAA6B,CAAA;AACrE,EAAA,IAAI,CAAC,MAAQ,EAAA;AACX,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,+BAA+B,6BAA6B,CAAA,WAAA;AAAA,KAC9D;AAAA;AAEF,EAAO,OAAA,MAAA;AACT,CAAA;AAEA,MAAM,WAAA,GAAc,CAAC,GAAA,GAA0B,EAAO,KAAA;AACpD,EAAI,IAAA;AAEF,IAAA,IAAI,IAAI,GAAG,CAAA;AA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A,MAAM,IAAI,eAAgB,CAAA,YAAY,CAAE,CAAA,KAAA,CAAM,CAAC,CAAiB,KAAA;AAC9D,QAAA,MAAM,YAAY,CAAE,CAAA,IAAA;AACpB,QAAM,MAAA,UAAA,GAAa,SAAW,EAAA,IAAA,IAAQ,CAAE,CAAA,UAAA;AACxC,QAAM,MAAA,OAAA,GAAU,SAAW,EAAA,OAAA,IAAW,CAAE,CAAA,OAAA;AACxC,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,CAAA,uCAAA,EAA0C,UAAU,CAAA,IAAA,EAAO,OAAO,CAAA;AAAA,SACpE;AAAA,OACD,CAAA;AAAA;AACH,GACD,CAAA;AACH;;;;;"}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var createKubernetesNamespace = require('./actions/createKubernetesNamespace.cjs.js');
6
+ var module$1 = require('./module.cjs.js');
7
+
8
+
9
+
10
+ exports.createKubernetesNamespaceAction = createKubernetesNamespace.createKubernetesNamespaceAction;
11
+ exports.default = module$1.scaffolderModuleKubernetesAction;
12
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,19 @@
1
+ import * as _backstage_plugin_scaffolder_node from '@backstage/plugin-scaffolder-node';
2
+ import * as _backstage_types_index from '@backstage/types/index';
3
+ import { CatalogClient } from '@backstage/catalog-client';
4
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
5
+
6
+ type TemplateActionParameters = {
7
+ namespace: string;
8
+ clusterRef?: string;
9
+ url?: string;
10
+ token: string;
11
+ skipTLSVerify?: boolean;
12
+ caData?: string;
13
+ labels?: string;
14
+ };
15
+ declare function createKubernetesNamespaceAction(catalogClient: CatalogClient): _backstage_plugin_scaffolder_node.TemplateAction<TemplateActionParameters, _backstage_types_index.JsonObject>;
16
+
17
+ declare const scaffolderModuleKubernetesAction: _backstage_backend_plugin_api.BackendFeature;
18
+
19
+ export { createKubernetesNamespaceAction, scaffolderModuleKubernetesAction as default };
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var backendPluginApi = require('@backstage/backend-plugin-api');
4
+ var catalogClient = require('@backstage/catalog-client');
5
+ var alpha = require('@backstage/plugin-scaffolder-node/alpha');
6
+ var createKubernetesNamespace = require('./actions/createKubernetesNamespace.cjs.js');
7
+
8
+ const scaffolderModuleKubernetesAction = backendPluginApi.createBackendModule({
9
+ moduleId: "scaffolder-backend-kubernetes",
10
+ pluginId: "scaffolder",
11
+ register(env) {
12
+ env.registerInit({
13
+ deps: {
14
+ scaffolder: alpha.scaffolderActionsExtensionPoint,
15
+ discovery: backendPluginApi.coreServices.discovery
16
+ },
17
+ async init({ scaffolder, discovery }) {
18
+ const catalogClient$1 = new catalogClient.CatalogClient({
19
+ discoveryApi: discovery
20
+ });
21
+ scaffolder.addActions(createKubernetesNamespace.createKubernetesNamespaceAction(catalogClient$1));
22
+ }
23
+ });
24
+ }
25
+ });
26
+
27
+ exports.scaffolderModuleKubernetesAction = scaffolderModuleKubernetesAction;
28
+ //# sourceMappingURL=module.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { CatalogClient } from '@backstage/catalog-client';\nimport { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';\n\nimport { createKubernetesNamespaceAction } from './actions';\n\nexport const scaffolderModuleKubernetesAction = createBackendModule({\n moduleId: 'scaffolder-backend-kubernetes',\n pluginId: 'scaffolder',\n register(env) {\n env.registerInit({\n deps: {\n scaffolder: scaffolderActionsExtensionPoint,\n discovery: coreServices.discovery,\n },\n async init({ scaffolder, discovery }) {\n const catalogClient = new CatalogClient({\n discoveryApi: discovery,\n });\n\n scaffolder.addActions(createKubernetesNamespaceAction(catalogClient));\n },\n });\n },\n});\n"],"names":["createBackendModule","scaffolderActionsExtensionPoint","coreServices","catalogClient","CatalogClient","createKubernetesNamespaceAction"],"mappings":";;;;;;;AAwBO,MAAM,mCAAmCA,oCAAoB,CAAA;AAAA,EAClE,QAAU,EAAA,+BAAA;AAAA,EACV,QAAU,EAAA,YAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,UAAY,EAAAC,qCAAA;AAAA,QACZ,WAAWC,6BAAa,CAAA;AAAA,OAC1B;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,UAAA,EAAY,WAAa,EAAA;AACpC,QAAM,MAAAC,eAAA,GAAgB,IAAIC,2BAAc,CAAA;AAAA,UACtC,YAAc,EAAA;AAAA,SACf,CAAA;AAED,QAAW,UAAA,CAAA,UAAA,CAAWC,yDAAgC,CAAAF,eAAa,CAAC,CAAA;AAAA;AACtE,KACD,CAAA;AAAA;AAEL,CAAC;;;;"}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@backstage-community/plugin-scaffolder-backend-module-kubernetes",
3
+ "description": "The kubernetes module for @backstage/plugin-scaffolder-backend",
4
+ "version": "2.2.2",
5
+ "main": "./dist/index.cjs.js",
6
+ "types": "./dist/index.d.ts",
7
+ "license": "Apache-2.0",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "backstage": {
12
+ "role": "backend-plugin-module",
13
+ "supported-versions": "1.32.5",
14
+ "pluginId": "scaffolder",
15
+ "pluginPackage": "@backstage/plugin-scaffolder-backend"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "backstage": "@backstage/BackendFeature",
20
+ "require": "./dist/index.cjs.js",
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.cjs.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "scripts": {
27
+ "start": "backstage-cli package start",
28
+ "build": "backstage-cli package build",
29
+ "tsc": "tsc",
30
+ "prettier:check": "prettier --ignore-unknown --check .",
31
+ "prettier:fix": "prettier --ignore-unknown --write .",
32
+ "lint:check": "backstage-cli package lint",
33
+ "lint:fix": "backstage-cli package lint --fix",
34
+ "test": "backstage-cli package test --passWithNoTests --coverage",
35
+ "clean": "backstage-cli package clean",
36
+ "prepack": "backstage-cli package prepack",
37
+ "postpack": "backstage-cli package postpack"
38
+ },
39
+ "dependencies": {
40
+ "@backstage/backend-plugin-api": "^1.0.1",
41
+ "@backstage/catalog-client": "^1.7.1",
42
+ "@backstage/plugin-scaffolder-node": "^0.5.0",
43
+ "@kubernetes/client-node": "^0.22.1"
44
+ },
45
+ "devDependencies": {
46
+ "@backstage/catalog-model": "1.7.0",
47
+ "@backstage/cli": "0.28.2",
48
+ "@backstage/plugin-scaffolder-node-test-utils": "0.1.14",
49
+ "msw": "1.3.3",
50
+ "prettier": "3.3.3"
51
+ },
52
+ "files": [
53
+ "dist"
54
+ ],
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "https://github.com/backstage/community-plugins",
58
+ "directory": "workspaces/scaffolder-backend-module-kubernetes/plugins/kubernetes-actions"
59
+ },
60
+ "keywords": [
61
+ "support:tech-preview",
62
+ "lifecycle:active",
63
+ "backstage",
64
+ "backend-plugin-module"
65
+ ],
66
+ "bugs": "https://github.com/backstage/community-plugins/issues",
67
+ "author": "The Backstage Community"
68
+ }