@highstate/library 0.9.14 → 0.9.16

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/src/talos.ts CHANGED
@@ -27,8 +27,6 @@ export const cluster = defineUnit({
27
27
  * The name of the cluster.
28
28
  *
29
29
  * By default, the name of the instance is used.
30
- *
31
- * @schema
32
30
  */
33
31
  clusterName: Type.Optional(Type.String()),
34
32
 
@@ -41,8 +39,6 @@ export const cluster = defineUnit({
41
39
  * - "none" (disable CNI, must be installed manually)
42
40
  *
43
41
  * The "cilium" CNI plugin is recommended to cover advanced network policies like FQDNs.
44
- *
45
- * @schema
46
42
  */
47
43
  cni: Type.Default(cniSchema, "cilium"),
48
44
 
@@ -52,32 +48,24 @@ export const cluster = defineUnit({
52
48
  * The following options are available:
53
49
  * - "local-path-provisioner" (default)
54
50
  * - "none" (disable CSI, must be installed manually if needed)
55
- *
56
- * @schema
57
51
  */
58
52
  csi: Type.Default(csiSchema, "local-path-provisioner"),
59
53
 
60
54
  /**
61
55
  * The shared configuration patch.
62
56
  * It will be applied to all nodes.
63
- *
64
- * @schema
65
57
  */
66
58
  sharedConfigPatch: Type.Optional(Type.Record(Type.String(), Type.Any())),
67
59
 
68
60
  /**
69
61
  * The master configuration patch.
70
62
  * It will be applied to all master nodes.
71
- *
72
- * @schema
73
63
  */
74
64
  masterConfigPatch: Type.Optional(Type.Record(Type.String(), Type.Any())),
75
65
 
76
66
  /**
77
67
  * The worker configuration patch.
78
68
  * It will be applied to all worker nodes.
79
- *
80
- * @schema
81
69
  */
82
70
  workerConfigPatch: Type.Optional(Type.Record(Type.String(), Type.Any())),
83
71
 
package/src/wireguard.ts CHANGED
@@ -90,8 +90,6 @@ export const network = defineUnit({
90
90
  * 2. `amneziawg` - The censorship-resistant fork of WireGuard.
91
91
  *
92
92
  * By default, the `wireguard` backend is used.
93
- *
94
- * @schema
95
93
  */
96
94
  backend: Type.Default(backendSchema, "wireguard"),
97
95
 
@@ -99,8 +97,6 @@ export const network = defineUnit({
99
97
  * The option to enable IPv6 support in the network.
100
98
  *
101
99
  * By default, IPv6 support is disabled.
102
- *
103
- * @schema
104
100
  */
105
101
  ipv6: Type.Default(Type.Boolean(), false),
106
102
  },
@@ -128,8 +124,6 @@ const sharedPeerArgs = {
128
124
  * The name of the WireGuard peer.
129
125
  *
130
126
  * If not provided, the peer will be named after the unit.
131
- *
132
- * @schema
133
127
  */
134
128
  peerName: Type.Optional(Type.String()),
135
129
 
@@ -137,8 +131,6 @@ const sharedPeerArgs = {
137
131
  * The address of the WireGuard interface.
138
132
  *
139
133
  * The address may be any IPv4 or IPv6 address. CIDR notation is also supported.
140
- *
141
- * @schema
142
134
  */
143
135
  address: Type.Optional(Type.String()),
144
136
 
@@ -146,8 +138,6 @@ const sharedPeerArgs = {
146
138
  * The convenience option to set `allowedIps` to `0.0.0.0/0, ::/0`.
147
139
  *
148
140
  * Will be merged with the `allowedIps` if provided.
149
- *
150
- * @schema
151
141
  */
152
142
  exitNode: Type.Default(Type.Boolean(), false),
153
143
 
@@ -159,8 +149,6 @@ const sharedPeerArgs = {
159
149
  * - This list will not be used to generate the allowed IPs for the peer.
160
150
  * - Instead, the node will setup extra direct routes to these IPs via default gateway.
161
151
  * - This allows to use `0.0.0.0/0, ::/0` in the `allowedIps` (and corresponding fwmark magic) and still have some IPs excluded from the tunnel.
162
- *
163
- * @schema
164
152
  */
165
153
  excludedIps: Type.Default(Type.Array(Type.String()), []),
166
154
 
@@ -179,15 +167,11 @@ const sharedPeerArgs = {
179
167
  * - `fe80::/10`
180
168
  *
181
169
  * Will be merged with `excludedIps` if provided.
182
- *
183
- * @schema
184
170
  */
185
171
  excludePrivateIps: Type.Default(Type.Boolean(), false),
186
172
 
187
173
  /**
188
174
  * The endpoints of the WireGuard peer.
189
- *
190
- * @schema
191
175
  */
192
176
  endpoints: Type.Default(Type.Array(Type.String()), []),
193
177
 
@@ -195,8 +179,6 @@ const sharedPeerArgs = {
195
179
  * The allowed endpoints of the WireGuard peer.
196
180
  *
197
181
  * The non `hostname` endpoints will be added to the `allowedIps` of the peer.
198
- *
199
- * @schema
200
182
  */
201
183
  allowedEndpoints: Type.Default(Type.Array(Type.String()), []),
202
184
 
@@ -204,8 +186,6 @@ const sharedPeerArgs = {
204
186
  * The DNS servers that should be used by the interface connected to the WireGuard peer.
205
187
  *
206
188
  * If multiple peers define DNS servers, the node will merge them into a single list (but this is discouraged).
207
- *
208
- * @schema
209
189
  */
210
190
  dns: Type.Default(Type.Array(Type.String()), []),
211
191
 
@@ -213,15 +193,11 @@ const sharedPeerArgs = {
213
193
  * The convenience option to include the DNS servers to the allowed IPs.
214
194
  *
215
195
  * By default, is `true`.
216
- *
217
- * @schema
218
196
  */
219
197
  includeDns: Type.Default(Type.Boolean(), true),
220
198
 
221
199
  /**
222
200
  * The port to listen on.
223
- *
224
- * @schema
225
201
  */
226
202
  listenPort: Type.Optional(Type.Number()),
227
203
  }
@@ -231,8 +207,6 @@ const sharedPeerInputs = {
231
207
  * The network to use for the WireGuard identity.
232
208
  *
233
209
  * If not provided, the identity will use default network configuration.
234
- *
235
- * @schema
236
210
  */
237
211
  network: {
238
212
  entity: networkEntity,
@@ -243,8 +217,6 @@ const sharedPeerInputs = {
243
217
  * The L3 endpoints of the identity.
244
218
  *
245
219
  * Will produce L4 endpoints for each of the provided L3 endpoints.
246
- *
247
- * @schema
248
220
  */
249
221
  l3Endpoints: {
250
222
  entity: l3EndpointEntity,
@@ -256,8 +228,6 @@ const sharedPeerInputs = {
256
228
  * The L4 endpoints of the identity.
257
229
  *
258
230
  * Will take priority over all calculated endpoints if provided.
259
- *
260
- * @schema
261
231
  */
262
232
  l4Endpoints: {
263
233
  entity: l4EndpointEntity,
@@ -272,8 +242,6 @@ const sharedPeerInputs = {
272
242
  *
273
243
  * If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,
274
244
  * the corresponding network policy will be created.
275
- *
276
- * @schema
277
245
  */
278
246
  allowedL3Endpoints: {
279
247
  entity: l3EndpointEntity,
@@ -286,8 +254,6 @@ const sharedPeerInputs = {
286
254
  *
287
255
  * If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,
288
256
  * the corresponding network policy will be created.
289
- *
290
- * @schema
291
257
  */
292
258
  allowedL4Endpoints: {
293
259
  entity: l4EndpointEntity,
@@ -316,8 +282,6 @@ export const peer = defineUnit({
316
282
 
317
283
  /**
318
284
  * The public key of the WireGuard peer.
319
- *
320
- * @schema
321
285
  */
322
286
  publicKey: Type.String(),
323
287
  },
@@ -325,8 +289,6 @@ export const peer = defineUnit({
325
289
  secrets: {
326
290
  /**
327
291
  * The pre-shared key which should be used for the peer.
328
- *
329
- * @schema
330
292
  */
331
293
  presharedKey: Type.Optional(Type.String()),
332
294
  },
@@ -354,8 +316,6 @@ export const peerPatch = defineUnit({
354
316
  args: {
355
317
  /**
356
318
  * The endpoints of the WireGuard peer.
357
- *
358
- * @schema
359
319
  */
360
320
  endpoints: Type.Default(Type.Array(Type.String()), []),
361
321
 
@@ -371,8 +331,6 @@ export const peerPatch = defineUnit({
371
331
  * The allowed endpoints of the WireGuard peer.
372
332
  *
373
333
  * The non `hostname` endpoints will be added to the `allowedIps` of the peer.
374
- *
375
- * @schema
376
334
  */
377
335
  allowedEndpoints: Type.Default(Type.Array(Type.String()), []),
378
336
 
@@ -427,8 +385,6 @@ export const identity = defineUnit({
427
385
  * The port to listen on.
428
386
  *
429
387
  * Used by the implementation of the identity and to calculate the endpoint of the peer.
430
- *
431
- * @schema
432
388
  */
433
389
  listenPort: Type.Optional(Type.Number()),
434
390
 
@@ -438,8 +394,6 @@ export const identity = defineUnit({
438
394
  * If overridden, does not affect node which implements the identity, but is used in the peer configuration of other nodes.
439
395
  *
440
396
  * Will take priority over all calculated endpoints and `l4Endpoint` input.
441
- *
442
- * @schema
443
397
  */
444
398
  endpoints: Type.Default(Type.Array(Type.String()), []),
445
399
  },
@@ -449,8 +403,6 @@ export const identity = defineUnit({
449
403
  * The private key of the WireGuard identity.
450
404
  *
451
405
  * If not provided, the key will be generated automatically.
452
- *
453
- * @schema
454
406
  */
455
407
  privateKey: Type.Optional(Type.String()),
456
408
 
@@ -458,8 +410,6 @@ export const identity = defineUnit({
458
410
  * The part of the pre-shared of the WireGuard identity.
459
411
  *
460
412
  * Will be generated automatically if not provided.
461
- *
462
- * @schema
463
413
  */
464
414
  presharedKeyPart: Type.Optional(Type.String()),
465
415
  },
@@ -493,15 +443,11 @@ export const node = defineUnit({
493
443
  * The name of the namespace/deployment/statefulset where the WireGuard node will be deployed.
494
444
  *
495
445
  * By default, the name is `wg-${identity.name}`.
496
- *
497
- * @schema
498
446
  */
499
447
  appName: Type.Optional(Type.String()),
500
448
 
501
449
  /**
502
450
  * Whether to expose the WireGuard node to the outside world.
503
- *
504
- * @schema
505
451
  */
506
452
  external: Type.Default(Type.Boolean(), false),
507
453
 
@@ -520,10 +466,18 @@ export const node = defineUnit({
520
466
  * The extra specification of the container which runs the WireGuard node.
521
467
  *
522
468
  * Will override any overlapping fields.
523
- *
524
- * @schema
525
469
  */
526
470
  containerSpec: Type.Optional(Type.Record(Type.String(), Type.Any())),
471
+
472
+ /**
473
+ * List of CIDR blocks that should be blocked from forwarding through this WireGuard node.
474
+ *
475
+ * This prevents other peers from reaching these destination CIDRs while still allowing
476
+ * the peers in those CIDRs to access the internet and other allowed endpoints.
477
+ *
478
+ * Useful for peer isolation where you want to prevent cross-peer communication.
479
+ */
480
+ forwardRestrictedIps: Type.Default(Type.Array(Type.String()), []),
527
481
  },
528
482
 
529
483
  inputs: {
@@ -587,8 +541,6 @@ export const config = defineUnit({
587
541
  * The name of the "default" interface where non-tunneled traffic should go.
588
542
  *
589
543
  * If not provided, the config will not respect `excludedIps`.
590
- *
591
- * @schema
592
544
  */
593
545
  defaultInterface: Type.Optional(Type.String()),
594
546
  },