@highstate/library 0.9.16 → 0.9.18

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/proxmox.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineEntity, defineUnit, Type } from "@highstate/contract"
1
+ import { defineEntity, defineUnit, z } from "@highstate/contract"
2
2
  import { checksumSchema, fileEntity, serverOutputs } from "./common"
3
3
  import { credentialsSchema, keyPairEntity } from "./ssh"
4
4
  import { l7EndpointEntity } from "./network"
@@ -6,18 +6,18 @@ import { l7EndpointEntity } from "./network"
6
6
  export const clusterEntity = defineEntity({
7
7
  type: "proxmox.cluster",
8
8
 
9
- schema: Type.Object({
9
+ schema: z.object({
10
10
  endpoint: l7EndpointEntity.schema,
11
- insecure: Type.Optional(Type.Boolean()),
12
- username: Type.Optional(Type.String()),
11
+ insecure: z.boolean().optional(),
12
+ username: z.string().optional(),
13
13
 
14
- defaultNodeName: Type.String(),
15
- defaultDatastoreId: Type.String(),
14
+ defaultNodeName: z.string(),
15
+ defaultDatastoreId: z.string(),
16
16
 
17
- password: Type.Optional(Type.String()),
18
- apiToken: Type.Optional(Type.String()),
17
+ password: z.string().optional(),
18
+ apiToken: z.string().optional(),
19
19
 
20
- ssh: Type.Optional(credentialsSchema),
20
+ ssh: credentialsSchema.optional(),
21
21
  }),
22
22
 
23
23
  meta: {
@@ -28,8 +28,8 @@ export const clusterEntity = defineEntity({
28
28
  export const imageEntity = defineEntity({
29
29
  type: "proxmox.image",
30
30
 
31
- schema: Type.Object({
32
- id: Type.String(),
31
+ schema: z.object({
32
+ id: z.string(),
33
33
  }),
34
34
 
35
35
  meta: {
@@ -44,47 +44,47 @@ export const connection = defineUnit({
44
44
  /**
45
45
  * The endpoint of the Proxmox API.
46
46
  */
47
- endpoint: Type.String(),
47
+ endpoint: z.string(),
48
48
 
49
49
  /**
50
50
  * Whether to allow insecure connections to the Proxmox API.
51
51
  */
52
- insecure: Type.Optional(Type.Boolean()),
52
+ insecure: z.boolean().optional(),
53
53
 
54
54
  /**
55
55
  * The username to use for the Proxmox API.
56
56
  *
57
57
  * Only required for password token authentication.
58
58
  */
59
- username: Type.Optional(Type.String()),
59
+ username: z.string().optional(),
60
60
 
61
61
  /**
62
62
  * The name of the default Proxmox node to use for operations.
63
63
  *
64
64
  * If not specified, the first node in the cluster will be used.
65
65
  */
66
- defaultNodeName: Type.Optional(Type.String()),
66
+ defaultNodeName: z.string().optional(),
67
67
 
68
68
  /**
69
69
  * The ID of the default Proxmox datastore to use for operations.
70
70
  *
71
71
  * If not specified, the first datastore in the cluster will be used.
72
72
  */
73
- defaultDatastoreId: Type.Optional(Type.String()),
73
+ defaultDatastoreId: z.string().optional(),
74
74
 
75
75
  /**
76
76
  * The username to use for SSH connections to the Proxmox nodes.
77
77
  *
78
78
  * By default, this is set to "root".
79
79
  */
80
- sshUser: Type.Default(Type.String(), "root"),
80
+ sshUser: z.string().default("root"),
81
81
 
82
82
  /**
83
83
  * The port to use for SSH connections to the Proxmox nodes.
84
84
  *
85
85
  * By default, this is set to 22.
86
86
  */
87
- sshPort: Type.Default(Type.Number(), 22),
87
+ sshPort: z.number().default(22),
88
88
  },
89
89
 
90
90
  secrets: {
@@ -94,9 +94,9 @@ export const connection = defineUnit({
94
94
  * Requires `username` to be set.
95
95
  */
96
96
  password: {
97
- schema: Type.Optional(Type.String()),
97
+ schema: z.string().optional(),
98
98
  meta: {
99
- displayName: "Proxmox Password",
99
+ title: "Proxmox Password",
100
100
  },
101
101
  },
102
102
 
@@ -104,16 +104,16 @@ export const connection = defineUnit({
104
104
  * The Proxmox API token to use for authentication.
105
105
  */
106
106
  apiToken: {
107
- schema: Type.Optional(Type.String()),
107
+ schema: z.string().optional(),
108
108
  meta: {
109
- displayName: "Proxmox API Token",
109
+ title: "Proxmox API Token",
110
110
  },
111
111
  },
112
112
 
113
113
  /**
114
114
  * The SSH password to use for connecting to the Proxmox nodes.
115
115
  */
116
- sshPassword: Type.Optional(Type.String()),
116
+ sshPassword: z.string().optional(),
117
117
  },
118
118
 
119
119
  inputs: {
@@ -131,11 +131,11 @@ export const connection = defineUnit({
131
131
  },
132
132
 
133
133
  meta: {
134
- displayName: "Proxmox Connection",
134
+ title: "Proxmox Connection",
135
135
  description: "The connection to an existing Proxmox cluster.",
136
136
  category: "Proxmox",
137
- primaryIcon: "simple-icons:proxmox",
138
- primaryIconColor: "#e56901",
137
+ icon: "simple-icons:proxmox",
138
+ iconColor: "#e56901",
139
139
  },
140
140
 
141
141
  source: {
@@ -154,31 +154,31 @@ export const image = defineUnit({
154
154
  * If not specified, the default name is `<unitName>-<sha256>.<extension>`
155
155
  * or `<unitName>.<extension>` if `sha256` is not provided.
156
156
  */
157
- fileName: Type.Optional(Type.String()),
157
+ fileName: z.string().optional(),
158
158
 
159
159
  /**
160
160
  * The URL of the image to upload.
161
161
  */
162
- url: Type.Optional(Type.String()),
162
+ url: z.string().optional(),
163
163
 
164
164
  /**
165
165
  * The checksum of the image file to verify.
166
166
  */
167
- checksum: Type.Optional(checksumSchema),
167
+ checksum: checksumSchema.optional(),
168
168
 
169
169
  /**
170
170
  * The name of the Proxmox node to upload the image to.
171
171
  *
172
172
  * If not specified, the default node name from the cluster will be used.
173
173
  */
174
- nodeName: Type.Optional(Type.String()),
174
+ nodeName: z.string().optional(),
175
175
 
176
176
  /**
177
177
  * The ID of the Proxmox datastore to upload the image to.
178
178
  *
179
179
  * If not specified, the default datastore ID from the cluster will be used.
180
180
  */
181
- datastoreId: Type.Optional(Type.String()),
181
+ datastoreId: z.string().optional(),
182
182
  },
183
183
 
184
184
  inputs: {
@@ -203,11 +203,11 @@ export const image = defineUnit({
203
203
  },
204
204
 
205
205
  meta: {
206
- displayName: "Proxmox Image",
206
+ title: "Proxmox Image",
207
207
  description: "The image to upload to a Proxmox cluster.",
208
208
  category: "Proxmox",
209
- primaryIcon: "simple-icons:proxmox",
210
- primaryIconColor: "#e56901",
209
+ icon: "simple-icons:proxmox",
210
+ iconColor: "#e56901",
211
211
  secondaryIcon: "mage:compact-disk-fill",
212
212
  },
213
213
 
@@ -221,7 +221,7 @@ export const existingImage = defineUnit({
221
221
  type: "proxmox.existing-image",
222
222
 
223
223
  args: {
224
- id: Type.String(),
224
+ id: z.string(),
225
225
  },
226
226
 
227
227
  inputs: {
@@ -233,11 +233,11 @@ export const existingImage = defineUnit({
233
233
  },
234
234
 
235
235
  meta: {
236
- displayName: "Proxmox Existing Image",
236
+ title: "Proxmox Existing Image",
237
237
  description: "The existing image on a Proxmox cluster.",
238
238
  category: "Proxmox",
239
- primaryIcon: "simple-icons:proxmox",
240
- primaryIconColor: "#e56901",
239
+ icon: "simple-icons:proxmox",
240
+ iconColor: "#e56901",
241
241
  secondaryIcon: "mage:compact-disk-fill",
242
242
  },
243
243
 
@@ -251,35 +251,155 @@ export const virtualMachine = defineUnit({
251
251
  type: "proxmox.virtual-machine",
252
252
 
253
253
  args: {
254
- nodeName: Type.Optional(Type.String()),
254
+ /**
255
+ * The name of the node to create the virtual machine on.
256
+ *
257
+ * If not specified, the default node name from the cluster will be used.
258
+ */
259
+ nodeName: z.string().optional(),
255
260
 
256
- cpuType: Type.Default(Type.String(), "host"),
257
- cores: Type.Default(Type.Number(), 1),
258
- sockets: Type.Default(Type.Number(), 1),
259
- memory: Type.Default(Type.Number(), 512),
261
+ /**
262
+ * The ID of the Proxmox datastore to create the virtual machine on.
263
+ *
264
+ * If not specified, the default datastore ID from the cluster will be used.
265
+ */
266
+ datastoreId: z.string().optional(),
260
267
 
261
268
  /**
262
- * The IPv4 address to assign to the virtual machine.
269
+ * The type of CPU to use for the virtual machine.
263
270
  *
264
- * If not specified, the virtual machine will not have an IPv4 address.
271
+ * By default, this is set to "host" which offers the best performance.
265
272
  */
266
- ipv4: Type.Optional(Type.String()),
267
- ipv4Gateway: Type.Optional(Type.String()),
268
- dns: Type.Optional(Type.Array(Type.String())),
273
+ cpuType: z.string().default("host"),
269
274
 
270
- datastoreId: Type.Optional(Type.String()),
271
- diskSize: Type.Default(Type.Number(), 8),
272
- bridge: Type.Default(Type.String(), "vmbr0"),
275
+ /**
276
+ * The resources to allocate to the virtual machine.
277
+ */
278
+ resources: z
279
+ .object({
280
+ /**
281
+ * The number of CPU cores to allocate to the virtual machine.
282
+ *
283
+ * By default, this is set to 1.
284
+ */
285
+ cores: z.number(),
286
+
287
+ /**
288
+ * The number of CPU sockets to allocate to the virtual machine.
289
+ *
290
+ * By default, this is set to 1.
291
+ */
292
+ sockets: z.number(),
293
+
294
+ /**
295
+ * The amount of dedicated memory to allocate to the virtual machine, in MB.
296
+ *
297
+ * By default, this is set to 512 MB.
298
+ */
299
+ memory: z.number(),
300
+
301
+ /**
302
+ * The size of the disk to create for the virtual machine, in GB.
303
+ *
304
+ * By default, this is set to 8 GB.
305
+ */
306
+ diskSize: z.number(),
307
+ })
308
+ .default({
309
+ cores: 1,
310
+ sockets: 1,
311
+ memory: 512,
312
+ diskSize: 8,
313
+ }),
273
314
 
274
- sshPort: Type.Default(Type.Number(), 22),
275
- sshUser: Type.Default(Type.String(), "root"),
315
+ /**
316
+ * The IPv4 address configuration for the virtual machine.
317
+ */
318
+ ipv4: z
319
+ .discriminatedUnion("type", [
320
+ z.object({
321
+ type: z.literal("dhcp"),
322
+ }),
323
+ z.object({
324
+ type: z.literal("static"),
325
+
326
+ /**
327
+ * The IPv4 address to assign to the virtual machine.
328
+ */
329
+ address: z.string(),
330
+
331
+ /**
332
+ * The CIDR prefix for the IPv4 address.
333
+ *
334
+ * By default, this is set to 24.
335
+ */
336
+ prefix: z.number().default(24),
337
+
338
+ /**
339
+ * The IPv4 gateway for the virtual machine.
340
+ *
341
+ * If not specified, will be set to the first address in the subnet.
342
+ */
343
+ gateway: z.string().optional(),
344
+ }),
345
+ ])
346
+ .default({ type: "dhcp" }),
276
347
 
277
- waitForAgent: Type.Default(Type.Boolean(), true),
278
- vendorData: Type.Optional(Type.String({ language: "yaml" })),
348
+ /**
349
+ * The network configuration for the virtual machine.
350
+ */
351
+ network: z
352
+ .object({
353
+ /**
354
+ * The list of DNS servers to use for the virtual machine.
355
+ */
356
+ dns: z.string().array(),
357
+
358
+ /**
359
+ * The name of the network bridge to connect the virtual machine to.
360
+ *
361
+ * By default, this is set to "vmbr0".
362
+ */
363
+ bridge: z.string(),
364
+ })
365
+ .default({ dns: [], bridge: "vmbr0" }),
366
+
367
+ /**
368
+ * The SSH configuration for the virtual machine.
369
+ */
370
+ ssh: z
371
+ .object({
372
+ /**
373
+ * The port to use for SSH connections to the virtual machine.
374
+ *
375
+ * By default, this is set to 22.
376
+ */
377
+ port: z.number(),
378
+
379
+ /**
380
+ * The user to use for SSH connections to the virtual machine.
381
+ *
382
+ * By default, this is set to "root".
383
+ */
384
+ user: z.string(),
385
+ })
386
+ .default({ port: 22, user: "root" }),
387
+
388
+ /**
389
+ * Whether to wait for the Proxmox agent to be ready before returning.
390
+ */
391
+ waitForAgent: z.boolean().default(true),
392
+
393
+ /**
394
+ * The cloud-init vendor data to use for the virtual machine.
395
+ *
396
+ * Will take precedence over the `vendorData` input.
397
+ */
398
+ vendorData: z.string().optional().meta({ multiline: true }),
279
399
  },
280
400
 
281
401
  secrets: {
282
- sshPassword: Type.Optional(Type.String()),
402
+ sshPassword: z.string().optional(),
283
403
  },
284
404
 
285
405
  inputs: {
@@ -305,11 +425,11 @@ export const virtualMachine = defineUnit({
305
425
  outputs: serverOutputs,
306
426
 
307
427
  meta: {
308
- displayName: "Proxmox Virtual Machine",
428
+ title: "Proxmox Virtual Machine",
309
429
  description: "The virtual machine on a Proxmox cluster.",
310
430
  category: "Proxmox",
311
- primaryIcon: "simple-icons:proxmox",
312
- primaryIconColor: "#e56901",
431
+ icon: "simple-icons:proxmox",
432
+ iconColor: "#e56901",
313
433
  secondaryIcon: "codicon:vm",
314
434
  },
315
435
 
package/src/restic.ts CHANGED
@@ -1,16 +1,16 @@
1
- import { defineEntity, defineUnit, Type, type Static } from "@highstate/contract"
1
+ import { defineEntity, defineUnit, z } from "@highstate/contract"
2
2
  import { l3EndpointEntity, l4EndpointEntity } from "./network"
3
3
 
4
4
  export const repositoryEntity = defineEntity({
5
5
  type: "restic.repository",
6
6
 
7
- schema: Type.Object({
8
- remoteEndpoints: Type.Array(Type.Union([l3EndpointEntity.schema, l4EndpointEntity.schema])),
7
+ schema: z.object({
8
+ remoteEndpoints: z.union([l3EndpointEntity.schema, l4EndpointEntity.schema]).array(),
9
9
 
10
- type: Type.Literal("rclone"),
11
- rcloneConfig: Type.String(),
12
- remoteName: Type.String(),
13
- pathPattern: Type.String(),
10
+ type: z.literal("rclone"),
11
+ rcloneConfig: z.string(),
12
+ remoteName: z.string(),
13
+ pathPattern: z.string(),
14
14
  }),
15
15
 
16
16
  meta: {
@@ -22,7 +22,7 @@ export const repo = defineUnit({
22
22
  type: "restic.repo",
23
23
 
24
24
  args: {
25
- remoteEndpoints: Type.Default(Type.Array(Type.String()), []),
25
+ remoteEndpoints: z.string().array().default([]),
26
26
 
27
27
  /**
28
28
  * The pattern for the path where backups will be stored for the specific application.
@@ -35,11 +35,11 @@ export const repo = defineUnit({
35
35
  *
36
36
  * By default, the path pattern is `backups/$clusterName/$appName`.
37
37
  */
38
- pathPattern: Type.Default(Type.String(), "backups/$clusterName/$appName"),
38
+ pathPattern: z.string().default("backups/$clusterName/$appName"),
39
39
  },
40
40
 
41
41
  secrets: {
42
- rcloneConfig: Type.String({ language: "ini" }),
42
+ rcloneConfig: z.string(),
43
43
  },
44
44
 
45
45
  inputs: {
@@ -60,10 +60,10 @@ export const repo = defineUnit({
60
60
  },
61
61
 
62
62
  meta: {
63
- displayName: "Restic Repo",
63
+ title: "Restic Repo",
64
64
  description: "Holds the configuration for a Restic repository and its remote storage.",
65
- primaryIconColor: "#e56901",
66
- primaryIcon: "material-symbols:backup",
65
+ iconColor: "#e56901",
66
+ icon: "material-symbols:backup",
67
67
  category: "Infrastructure",
68
68
  },
69
69
 
@@ -73,4 +73,4 @@ export const repo = defineUnit({
73
73
  },
74
74
  })
75
75
 
76
- export type Repository = Static<typeof repositoryEntity.schema>
76
+ export type Repository = z.infer<typeof repositoryEntity.schema>
package/src/sops.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineUnit, Type } from "@highstate/contract"
1
+ import { defineUnit, z } from "@highstate/contract"
2
2
  import { fileEntity } from "./files"
3
3
  import { serverEntity } from "./common"
4
4
 
@@ -6,7 +6,7 @@ export const secrets = defineUnit({
6
6
  type: "sops.secrets",
7
7
 
8
8
  secrets: {
9
- data: Type.Record(Type.String(), Type.Any()),
9
+ data: z.record(z.string(), z.any()),
10
10
  },
11
11
 
12
12
  inputs: {
@@ -22,9 +22,9 @@ export const secrets = defineUnit({
22
22
  },
23
23
 
24
24
  meta: {
25
- displayName: "SOPS Secrets",
25
+ title: "SOPS Secrets",
26
26
  description: "Encrypts secrets using SOPS for the specified servers.",
27
- primaryIcon: "mdi:file-lock",
27
+ icon: "mdi:file-lock",
28
28
  category: "Secrets",
29
29
  },
30
30
 
package/src/ssh.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { defineEntity, defineUnit, Type, type Static } from "@highstate/contract"
1
+ import { defineEntity, defineUnit, z } from "@highstate/contract"
2
2
  import { l4EndpointEntity } from "./network"
3
3
  import { fileEntity } from "./files"
4
4
 
5
- export const keyTypeSchema = Type.StringEnum(["ed25519"])
5
+ export const keyTypeSchema = z.enum(["ed25519"])
6
6
 
7
7
  export const keyPairEntity = defineEntity({
8
8
  type: "ssh.key-pair",
9
9
 
10
- schema: Type.Object({
10
+ schema: z.object({
11
11
  type: keyTypeSchema,
12
- fingerprint: Type.String(),
13
- publicKey: Type.String(),
14
- privateKey: Type.String(),
12
+ fingerprint: z.string(),
13
+ publicKey: z.string(),
14
+ privateKey: z.string(),
15
15
  }),
16
16
 
17
17
  meta: {
@@ -19,19 +19,19 @@ export const keyPairEntity = defineEntity({
19
19
  },
20
20
  })
21
21
 
22
- export const credentialsSchema = Type.Object({
23
- endpoints: Type.Array(l4EndpointEntity.schema),
24
- hostKey: Type.String(),
25
- user: Type.String(),
26
- password: Type.Optional(Type.String()),
27
- keyPair: Type.Optional(keyPairEntity.schema),
22
+ export const credentialsSchema = z.object({
23
+ endpoints: l4EndpointEntity.schema.array(),
24
+ hostKey: z.string(),
25
+ user: z.string(),
26
+ password: z.string().optional(),
27
+ keyPair: keyPairEntity.schema.optional(),
28
28
  })
29
29
 
30
30
  export const keyPair = defineUnit({
31
31
  type: "ssh.key-pair",
32
32
 
33
33
  secrets: {
34
- privateKey: Type.Optional(Type.String()),
34
+ privateKey: z.string().optional(),
35
35
  },
36
36
 
37
37
  outputs: {
@@ -40,11 +40,11 @@ export const keyPair = defineUnit({
40
40
  },
41
41
 
42
42
  meta: {
43
- displayName: "SSH Key Pair",
43
+ title: "SSH Key Pair",
44
44
  description: "Holds the ED25519 SSH key pair and generates the private key if not provided.",
45
45
  category: "ssh",
46
- primaryIcon: "charm:key",
47
- primaryIconColor: "#ffffff",
46
+ icon: "charm:key",
47
+ iconColor: "#ffffff",
48
48
  secondaryIcon: "mdi:lock",
49
49
  secondaryIconColor: "#ffffff",
50
50
  },
@@ -55,6 +55,6 @@ export const keyPair = defineUnit({
55
55
  },
56
56
  })
57
57
 
58
- export type KeyType = Static<typeof keyTypeSchema>
59
- export type Credentials = Static<typeof credentialsSchema>
60
- export type KeyPair = Static<typeof keyPairEntity.schema>
58
+ export type KeyType = z.infer<typeof keyTypeSchema>
59
+ export type Credentials = z.infer<typeof credentialsSchema>
60
+ export type KeyPair = z.infer<typeof keyPairEntity.schema>
package/src/talos.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { defineEntity, defineUnit, Type } from "@highstate/contract"
1
+ import { defineEntity, defineUnit, z } from "@highstate/contract"
2
2
  import { clusterInputs, clusterOutputs, scheduleOnMastersPolicyArgs } from "./k8s"
3
3
 
4
4
  export const clusterEntity = defineEntity({
5
5
  type: "talos.cluster",
6
6
 
7
- schema: Type.Object({
8
- clientConfiguration: Type.String(),
9
- machineSecrets: Type.String(),
7
+ schema: z.object({
8
+ clientConfiguration: z.string(),
9
+ machineSecrets: z.string(),
10
10
  }),
11
11
 
12
12
  meta: {
@@ -14,8 +14,8 @@ export const clusterEntity = defineEntity({
14
14
  },
15
15
  })
16
16
 
17
- export const cniSchema = Type.StringEnum(["none", "cilium", "flannel"])
18
- export const csiSchema = Type.StringEnum(["none", "local-path-provisioner"])
17
+ export const cniSchema = z.enum(["none", "cilium", "flannel"])
18
+ export const csiSchema = z.enum(["none", "local-path-provisioner"])
19
19
 
20
20
  export const cluster = defineUnit({
21
21
  type: "talos.cluster",
@@ -28,7 +28,7 @@ export const cluster = defineUnit({
28
28
  *
29
29
  * By default, the name of the instance is used.
30
30
  */
31
- clusterName: Type.Optional(Type.String()),
31
+ clusterName: z.string().optional(),
32
32
 
33
33
  /**
34
34
  * The CNI plugin to use.
@@ -40,7 +40,7 @@ export const cluster = defineUnit({
40
40
  *
41
41
  * The "cilium" CNI plugin is recommended to cover advanced network policies like FQDNs.
42
42
  */
43
- cni: Type.Default(cniSchema, "cilium"),
43
+ cni: cniSchema.default("cilium"),
44
44
 
45
45
  /**
46
46
  * The CSI plugin to use.
@@ -49,25 +49,25 @@ export const cluster = defineUnit({
49
49
  * - "local-path-provisioner" (default)
50
50
  * - "none" (disable CSI, must be installed manually if needed)
51
51
  */
52
- csi: Type.Default(csiSchema, "local-path-provisioner"),
52
+ csi: csiSchema.default("local-path-provisioner"),
53
53
 
54
54
  /**
55
55
  * The shared configuration patch.
56
56
  * It will be applied to all nodes.
57
57
  */
58
- sharedConfigPatch: Type.Optional(Type.Record(Type.String(), Type.Any())),
58
+ sharedConfigPatch: z.record(z.string(), z.any()).optional(),
59
59
 
60
60
  /**
61
61
  * The master configuration patch.
62
62
  * It will be applied to all master nodes.
63
63
  */
64
- masterConfigPatch: Type.Optional(Type.Record(Type.String(), Type.Any())),
64
+ masterConfigPatch: z.record(z.string(), z.any()).optional(),
65
65
 
66
66
  /**
67
67
  * The worker configuration patch.
68
68
  * It will be applied to all worker nodes.
69
69
  */
70
- workerConfigPatch: Type.Optional(Type.Record(Type.String(), Type.Any())),
70
+ workerConfigPatch: z.record(z.string(), z.any()).optional(),
71
71
 
72
72
  /**
73
73
  * Whether to enable the Tun device plugin.
@@ -76,7 +76,7 @@ export const cluster = defineUnit({
76
76
  *
77
77
  * By default, this option is set to true.
78
78
  */
79
- enableTunDevicePlugin: Type.Default(Type.Boolean(), true),
79
+ enableTunDevicePlugin: z.boolean().default(true),
80
80
  },
81
81
 
82
82
  inputs: clusterInputs,
@@ -87,11 +87,11 @@ export const cluster = defineUnit({
87
87
  },
88
88
 
89
89
  meta: {
90
- displayName: "Talos Cluster",
90
+ title: "Talos Cluster",
91
91
  description: "A Kubernetes cluster managed by Talos.",
92
92
  category: "Talos",
93
93
  color: "#2d2d2d",
94
- primaryIcon: "simple-icons:talos",
94
+ icon: "simple-icons:talos",
95
95
  secondaryIcon: "devicon:kubernetes",
96
96
  },
97
97