@highstate/library 0.9.4 → 0.9.5
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/dist/highstate.manifest.json +1 -1
- package/dist/index.js +1817 -1187
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/apps/code-server.ts +5 -23
- package/src/apps/deployment.ts +18 -40
- package/src/apps/dns.ts +109 -0
- package/src/apps/gitea.ts +6 -19
- package/src/apps/grocy.ts +6 -20
- package/src/apps/index.ts +5 -1
- package/src/apps/kubernetes-dashboard.ts +8 -17
- package/src/apps/mariadb.ts +22 -38
- package/src/apps/maybe.ts +6 -21
- package/src/apps/mongodb.ts +21 -38
- package/src/apps/network.ts +55 -0
- package/src/apps/postgresql.ts +21 -37
- package/src/apps/shared.ts +217 -0
- package/src/apps/syncthing.ts +25 -27
- package/src/apps/test.ts +19 -0
- package/src/apps/traefik.ts +5 -6
- package/src/apps/vaultwarden.ts +6 -16
- package/src/apps/zitadel.ts +4 -14
- package/src/cloudflare.ts +1 -0
- package/src/common.ts +124 -38
- package/src/dns.ts +60 -23
- package/src/index.ts +2 -0
- package/src/k3s.ts +19 -17
- package/src/k8s.ts +288 -113
- package/src/mullvad.ts +7 -9
- package/src/network.ts +180 -0
- package/src/nixos.ts +4 -0
- package/src/obfuscators/index.ts +1 -0
- package/src/obfuscators/phantun.ts +2 -0
- package/src/obfuscators/shared.ts +66 -15
- package/src/proxmox.ts +10 -9
- package/src/restic.ts +2 -1
- package/src/sops.ts +1 -0
- package/src/ssh.ts +9 -11
- package/src/talos.ts +4 -41
- package/src/timeweb.ts +2 -0
- package/src/utils.ts +37 -0
- package/src/wireguard.ts +232 -241
package/dist/index.js
CHANGED
@@ -11,12 +11,13 @@ __export(common_exports, {
|
|
11
11
|
fileContentEntity: () => fileContentEntity,
|
12
12
|
fileEntity: () => fileEntity,
|
13
13
|
fileMetaEntity: () => fileMetaEntity,
|
14
|
-
l3EndpointEntity: () => l3EndpointEntity,
|
15
|
-
l4EndpointEntity: () => l4EndpointEntity,
|
16
14
|
script: () => script,
|
17
|
-
|
15
|
+
serverDns: () => serverDns,
|
16
|
+
serverEntity: () => serverEntity,
|
17
|
+
serverOutputs: () => serverOutputs,
|
18
|
+
serverPatch: () => serverPatch
|
18
19
|
});
|
19
|
-
import { defineEntity as
|
20
|
+
import { defineEntity as defineEntity4, defineUnit as defineUnit3, Type as Type5 } from "@highstate/contract";
|
20
21
|
|
21
22
|
// src/ssh.ts
|
22
23
|
var ssh_exports = {};
|
@@ -26,34 +27,171 @@ __export(ssh_exports, {
|
|
26
27
|
keyPairEntity: () => keyPairEntity,
|
27
28
|
keyTypeSchema: () => keyTypeSchema
|
28
29
|
});
|
30
|
+
import { defineEntity as defineEntity2, defineUnit as defineUnit2, Type as Type2 } from "@highstate/contract";
|
31
|
+
|
32
|
+
// src/network.ts
|
33
|
+
var network_exports = {};
|
34
|
+
__export(network_exports, {
|
35
|
+
endpointFilterSchema: () => endpointFilterSchema,
|
36
|
+
endpointVisibilitySchema: () => endpointVisibilitySchema,
|
37
|
+
l3Endpoint: () => l3Endpoint,
|
38
|
+
l3EndpointEntity: () => l3EndpointEntity,
|
39
|
+
l4Endpoint: () => l4Endpoint,
|
40
|
+
l4EndpointEntity: () => l4EndpointEntity,
|
41
|
+
l4ProtocolSchema: () => l4ProtocolSchema,
|
42
|
+
portInfoSchema: () => portInfoSchema
|
43
|
+
});
|
29
44
|
import { defineEntity, defineUnit, Type } from "@highstate/contract";
|
30
|
-
var
|
31
|
-
|
32
|
-
|
33
|
-
|
45
|
+
var endpointVisibilitySchema = Type.StringEnum([
|
46
|
+
"public",
|
47
|
+
// Reachable from the public internet
|
48
|
+
"external",
|
49
|
+
// Reachable from outside the system boundary, but not public
|
50
|
+
"internal"
|
51
|
+
// Reachable only from within the system or cluster
|
34
52
|
]);
|
35
|
-
var
|
53
|
+
var endpointFilterSchema = Type.Array(endpointVisibilitySchema);
|
54
|
+
var l3EndpointEntity = defineEntity({
|
55
|
+
type: "network.l3-endpoint",
|
56
|
+
schema: Type.Intersect([
|
57
|
+
Type.Object({
|
58
|
+
visibility: endpointVisibilitySchema,
|
59
|
+
metadata: Type.Optional(Type.Record(Type.String(), Type.Unknown()))
|
60
|
+
}),
|
61
|
+
Type.Union([
|
62
|
+
Type.Object({
|
63
|
+
type: Type.Literal("hostname"),
|
64
|
+
/**
|
65
|
+
* The hostname of the endpoint in the format of a domain name.
|
66
|
+
*/
|
67
|
+
hostname: Type.String()
|
68
|
+
}),
|
69
|
+
Type.Object({
|
70
|
+
type: Type.Literal("ipv4"),
|
71
|
+
/**
|
72
|
+
* The IPv4 address of the endpoint.
|
73
|
+
*/
|
74
|
+
address: Type.String()
|
75
|
+
}),
|
76
|
+
Type.Object({
|
77
|
+
type: Type.Literal("ipv6"),
|
78
|
+
/**
|
79
|
+
* The IPv6 address of the endpoint.
|
80
|
+
*/
|
81
|
+
address: Type.String()
|
82
|
+
})
|
83
|
+
])
|
84
|
+
]),
|
85
|
+
meta: {
|
86
|
+
color: "#4CAF50",
|
87
|
+
description: "The L3 endpoint for some service. May be a domain name or an IP address."
|
88
|
+
}
|
89
|
+
});
|
90
|
+
var l4ProtocolSchema = Type.StringEnum(["tcp", "udp"]);
|
91
|
+
var portInfoSchema = Type.Object({
|
92
|
+
port: Type.Number(),
|
93
|
+
protocol: l4ProtocolSchema
|
94
|
+
});
|
95
|
+
var l4EndpointEntity = defineEntity({
|
96
|
+
type: "network.l4-endpoint",
|
97
|
+
schema: Type.Intersect([l3EndpointEntity.schema, portInfoSchema]),
|
98
|
+
meta: {
|
99
|
+
color: "#2196F3",
|
100
|
+
description: "The L4 endpoint for some service. Extends an L3 endpoint with a port."
|
101
|
+
}
|
102
|
+
});
|
103
|
+
var l3Endpoint = defineUnit({
|
104
|
+
type: "network.l3-endpoint",
|
105
|
+
args: {
|
106
|
+
/**
|
107
|
+
* The string representation of the endpoint.
|
108
|
+
*
|
109
|
+
* May be a domain name or an IP address.
|
110
|
+
*/
|
111
|
+
endpoint: Type.String(),
|
112
|
+
/**
|
113
|
+
* The visibility of the endpoint.
|
114
|
+
*/
|
115
|
+
visibility: Type.Default(endpointVisibilitySchema, "public")
|
116
|
+
},
|
117
|
+
outputs: {
|
118
|
+
endpoint: l3EndpointEntity
|
119
|
+
},
|
120
|
+
meta: {
|
121
|
+
displayName: "L3 Endpoint",
|
122
|
+
description: "An L3 endpoint for some service. May be a domain name or an IP address.",
|
123
|
+
primaryIcon: "mdi:network-outline",
|
124
|
+
primaryIconColor: "#4CAF50",
|
125
|
+
defaultNamePrefix: "endpoint",
|
126
|
+
category: "Network"
|
127
|
+
},
|
128
|
+
source: {
|
129
|
+
package: "@highstate/common",
|
130
|
+
path: "units/network/l3-endpoint"
|
131
|
+
}
|
132
|
+
});
|
133
|
+
var l4Endpoint = defineUnit({
|
134
|
+
type: "network.l4-endpoint",
|
135
|
+
args: {
|
136
|
+
/**
|
137
|
+
* The string representation of the endpoint.
|
138
|
+
*
|
139
|
+
* May be a domain name or an IP address + port/protocol.
|
140
|
+
*
|
141
|
+
* The possible formats are:
|
142
|
+
*
|
143
|
+
* - `endpoint:port` (TCP by default)
|
144
|
+
* - `tcp://endpoint:port`
|
145
|
+
* - `udp://endpoint:port`
|
146
|
+
*/
|
147
|
+
endpoint: Type.String(),
|
148
|
+
/**
|
149
|
+
* The visibility of the endpoint.
|
150
|
+
*/
|
151
|
+
visibility: Type.Default(endpointVisibilitySchema, "public")
|
152
|
+
},
|
153
|
+
outputs: {
|
154
|
+
endpoint: l4EndpointEntity
|
155
|
+
},
|
156
|
+
meta: {
|
157
|
+
displayName: "L4 Endpoint",
|
158
|
+
description: "An L4 endpoint for some service. Extends an L3 endpoint with a port.",
|
159
|
+
primaryIcon: "mdi:network-outline",
|
160
|
+
primaryIconColor: "#2196F3",
|
161
|
+
defaultNamePrefix: "endpoint",
|
162
|
+
category: "Network"
|
163
|
+
},
|
164
|
+
source: {
|
165
|
+
package: "@highstate/common",
|
166
|
+
path: "units/network/l4-endpoint"
|
167
|
+
}
|
168
|
+
});
|
169
|
+
|
170
|
+
// src/ssh.ts
|
171
|
+
var keyTypeSchema = Type2.StringEnum(["ed25519"]);
|
172
|
+
var keyPairEntity = defineEntity2({
|
36
173
|
type: "ssh.key-pair",
|
37
|
-
schema:
|
174
|
+
schema: Type2.Object({
|
38
175
|
type: keyTypeSchema,
|
39
|
-
|
40
|
-
publicKey:
|
176
|
+
fingerprint: Type2.String(),
|
177
|
+
publicKey: Type2.String(),
|
178
|
+
privateKey: Type2.String()
|
41
179
|
}),
|
42
180
|
meta: {
|
43
181
|
color: "#2b5797"
|
44
182
|
}
|
45
183
|
});
|
46
|
-
var credentialsSchema =
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
password:
|
51
|
-
|
184
|
+
var credentialsSchema = Type2.Object({
|
185
|
+
endpoints: Type2.Array(l4EndpointEntity.schema),
|
186
|
+
hostKey: Type2.String(),
|
187
|
+
user: Type2.String(),
|
188
|
+
password: Type2.Optional(Type2.String()),
|
189
|
+
keyPair: Type2.Optional(keyPairEntity.schema)
|
52
190
|
});
|
53
|
-
var keyPair =
|
191
|
+
var keyPair = defineUnit2({
|
54
192
|
type: "ssh.key-pair",
|
55
193
|
secrets: {
|
56
|
-
privateKey:
|
194
|
+
privateKey: Type2.Optional(Type2.String())
|
57
195
|
},
|
58
196
|
outputs: {
|
59
197
|
keyPair: keyPairEntity
|
@@ -69,80 +207,291 @@ var keyPair = defineUnit({
|
|
69
207
|
},
|
70
208
|
source: {
|
71
209
|
package: "@highstate/common",
|
72
|
-
path: "ssh/key-pair"
|
210
|
+
path: "units/ssh/key-pair"
|
73
211
|
}
|
74
212
|
});
|
75
213
|
|
76
|
-
// src/
|
77
|
-
var
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
214
|
+
// src/dns.ts
|
215
|
+
var dns_exports = {};
|
216
|
+
__export(dns_exports, {
|
217
|
+
createArgs: () => createArgs,
|
218
|
+
inputs: () => inputs,
|
219
|
+
providerEntity: () => providerEntity
|
220
|
+
});
|
221
|
+
import { defineEntity as defineEntity3, Type as Type4 } from "@highstate/contract";
|
222
|
+
|
223
|
+
// src/utils.ts
|
224
|
+
import { Type as Type3 } from "@highstate/contract";
|
225
|
+
function prefixWith(string, prefix) {
|
226
|
+
return prefix ? `${prefix}${string.charAt(0).toUpperCase()}${string.slice(1)}` : string;
|
227
|
+
}
|
228
|
+
function prefixKeysWith(prefix, obj) {
|
229
|
+
return Object.fromEntries(
|
230
|
+
Object.entries(obj).map(([key, value]) => [prefixWith(key, prefix), value])
|
231
|
+
);
|
232
|
+
}
|
233
|
+
var arrayPatchModeSchema = Type3.StringEnum(["prepend", "replace"]);
|
234
|
+
|
235
|
+
// src/dns.ts
|
236
|
+
var providerEntity = defineEntity3({
|
237
|
+
type: "dns.provider",
|
238
|
+
schema: Type4.Object({
|
239
|
+
name: Type4.String(),
|
240
|
+
type: Type4.String(),
|
241
|
+
data: Type4.Record(Type4.String(), Type4.Unknown()),
|
242
|
+
domain: Type4.String()
|
83
243
|
}),
|
84
244
|
meta: {
|
85
|
-
color: "#
|
245
|
+
color: "#FF5722"
|
86
246
|
}
|
87
247
|
});
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
248
|
+
function createArgs(prefix) {
|
249
|
+
return prefixKeysWith(prefix, {
|
250
|
+
/**
|
251
|
+
* The FQDN to register the existing endpoints with.
|
252
|
+
*
|
253
|
+
* Will be inserted at the beginning of the resulting endpoint list.
|
254
|
+
*
|
255
|
+
* Will throw an error if no matching provider is found.
|
256
|
+
*
|
257
|
+
* @schema
|
258
|
+
*/
|
259
|
+
fqdn: {
|
260
|
+
...Type4.Optional(Type4.String()),
|
261
|
+
description: `The FQDN to register the existing endpoints with.
|
262
|
+
|
263
|
+
Will be inserted at the beginning of the resulting endpoint list.
|
264
|
+
|
265
|
+
Will throw an error if no matching provider is found.`
|
266
|
+
},
|
267
|
+
/**
|
268
|
+
* The endpoint filter to filter the endpoints before creating the DNS records.
|
269
|
+
*
|
270
|
+
* Possible values:
|
271
|
+
*
|
272
|
+
* - `public`: Only endpoints exposed to the public internet.
|
273
|
+
* - `external`: Reachable from outside the system but not public (e.g., LAN, VPC).
|
274
|
+
* - `internal`: Reachable only from within the system boundary (e.g., inside a cluster).
|
275
|
+
*
|
276
|
+
* You can select one or more values.
|
277
|
+
*
|
278
|
+
* If no value is provided, the endpoints will be filtered by the most accessible type:
|
279
|
+
*
|
280
|
+
* - If any public endpoints exist, all public endpoints are selected;
|
281
|
+
* - Otherwise, if any external endpoints exist, all external endpoints are selected;
|
282
|
+
* - If neither exist, all internal endpoints are selected.
|
283
|
+
*
|
284
|
+
* @schema
|
285
|
+
*/
|
286
|
+
endpointFilter: {
|
287
|
+
...Type4.Default(endpointFilterSchema, []),
|
288
|
+
description: `The endpoint filter to filter the endpoints before creating the DNS records.
|
289
|
+
|
290
|
+
Possible values:
|
291
|
+
|
292
|
+
- \`public\`: Only endpoints exposed to the public internet.
|
293
|
+
- \`external\`: Reachable from outside the system but not public (e.g., LAN, VPC).
|
294
|
+
- \`internal\`: Reachable only from within the system boundary (e.g., inside a cluster).
|
295
|
+
|
296
|
+
You can select one or more values.
|
297
|
+
|
298
|
+
If no value is provided, the endpoints will be filtered by the most accessible type:
|
299
|
+
|
300
|
+
- If any public endpoints exist, all public endpoints are selected;
|
301
|
+
- Otherwise, if any external endpoints exist, all external endpoints are selected;
|
302
|
+
- If neither exist, all internal endpoints are selected.`
|
303
|
+
},
|
304
|
+
/**
|
305
|
+
* The mode to use for patching the existing endpoints.
|
306
|
+
*
|
307
|
+
* - `prepend`: Prepend the FQDN to the existing endpoints. It will make them prioritized.
|
308
|
+
* - `replace`: Replace the existing endpoints with the FQDN. It will ensure that the only the FQDN is used.
|
309
|
+
*
|
310
|
+
* The default is `prepend`.
|
311
|
+
*
|
312
|
+
* @schema
|
313
|
+
*/
|
314
|
+
patchMode: {
|
315
|
+
...Type4.Default(arrayPatchModeSchema, "prepend"),
|
316
|
+
description: `The mode to use for patching the existing endpoints.
|
317
|
+
|
318
|
+
- \`prepend\`: Prepend the FQDN to the existing endpoints. It will make them prioritized.
|
319
|
+
- \`replace\`: Replace the existing endpoints with the FQDN. It will ensure that the only the FQDN is used.
|
320
|
+
|
321
|
+
The default is \`prepend\`.`
|
322
|
+
}
|
323
|
+
});
|
324
|
+
}
|
325
|
+
var inputs = {
|
326
|
+
/**
|
327
|
+
* The DNS providers to use to create the DNS records.
|
328
|
+
*
|
329
|
+
* If multiple providers match the domain, all of them will be used and multiple DNS records will be created.
|
330
|
+
*
|
331
|
+
* @schema
|
332
|
+
*/
|
333
|
+
dnsProviders: {
|
334
|
+
...{
|
335
|
+
entity: providerEntity,
|
336
|
+
multiple: true
|
337
|
+
},
|
338
|
+
description: `The DNS providers to use to create the DNS records.
|
339
|
+
|
340
|
+
If multiple providers match the domain, all of them will be used and multiple DNS records will be created.`
|
96
341
|
}
|
97
|
-
}
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
342
|
+
};
|
343
|
+
|
344
|
+
// src/common.ts
|
345
|
+
var serverEntity = defineEntity4({
|
346
|
+
type: "common.server",
|
347
|
+
schema: Type5.Object({
|
348
|
+
hostname: Type5.String(),
|
349
|
+
endpoints: Type5.Array(l3EndpointEntity.schema),
|
350
|
+
ssh: Type5.Optional(credentialsSchema)
|
103
351
|
}),
|
104
352
|
meta: {
|
105
|
-
color: "#
|
106
|
-
description: "The L4 endpoint for some service. Extends an L3 endpoint with a port."
|
353
|
+
color: "#009688"
|
107
354
|
}
|
108
355
|
});
|
109
|
-
var
|
356
|
+
var serverOutputs = {
|
357
|
+
server: serverEntity,
|
358
|
+
endpoints: {
|
359
|
+
entity: l3EndpointEntity,
|
360
|
+
multiple: true
|
361
|
+
}
|
362
|
+
};
|
363
|
+
var existingServer = defineUnit3({
|
110
364
|
type: "common.existing-server",
|
111
365
|
args: {
|
112
|
-
|
113
|
-
|
114
|
-
|
366
|
+
/**
|
367
|
+
* The endpoint of the server.
|
368
|
+
*
|
369
|
+
* Takes precedence over the `endpoint` input.
|
370
|
+
*/
|
371
|
+
endpoint: Type5.Optional(Type5.String()),
|
372
|
+
/**
|
373
|
+
* The SSH user to use for connecting to the server.
|
374
|
+
*/
|
375
|
+
sshUser: Type5.Default(Type5.String(), "root"),
|
376
|
+
/**
|
377
|
+
* The SSH port to use for connecting to the server.
|
378
|
+
*/
|
379
|
+
sshPort: Type5.Default(Type5.Number(), 22)
|
115
380
|
},
|
116
381
|
secrets: {
|
117
|
-
sshPassword:
|
118
|
-
sshPrivateKey:
|
382
|
+
sshPassword: Type5.Optional(Type5.String()),
|
383
|
+
sshPrivateKey: Type5.Optional(Type5.String())
|
119
384
|
},
|
120
385
|
inputs: {
|
121
386
|
sshKeyPair: {
|
122
387
|
entity: keyPairEntity,
|
123
388
|
required: false
|
389
|
+
},
|
390
|
+
endpoint: {
|
391
|
+
entity: l3EndpointEntity,
|
392
|
+
required: false
|
124
393
|
}
|
125
394
|
},
|
126
|
-
outputs:
|
127
|
-
server: serverEntity
|
128
|
-
},
|
395
|
+
outputs: serverOutputs,
|
129
396
|
meta: {
|
130
397
|
displayName: "Existing Server",
|
131
398
|
description: "An existing server that can be used in the configuration.",
|
132
399
|
primaryIcon: "mdi:server",
|
133
|
-
defaultNamePrefix: "server"
|
400
|
+
defaultNamePrefix: "server",
|
401
|
+
category: "Infrastructure"
|
402
|
+
},
|
403
|
+
source: {
|
404
|
+
package: "@highstate/common",
|
405
|
+
path: "units/existing-server"
|
406
|
+
}
|
407
|
+
});
|
408
|
+
var serverPatch = defineUnit3({
|
409
|
+
type: "common.server-patch",
|
410
|
+
args: {
|
411
|
+
/**
|
412
|
+
* The endpoints of the server.
|
413
|
+
*
|
414
|
+
* The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
415
|
+
*
|
416
|
+
* The same server may also be represented by multiple entries (e.g. a node with private and public IP).
|
417
|
+
*
|
418
|
+
* @schema
|
419
|
+
*/
|
420
|
+
endpoints: {
|
421
|
+
...Type5.Default(Type5.Array(Type5.String()), []),
|
422
|
+
description: `The endpoints of the server.
|
423
|
+
|
424
|
+
The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
425
|
+
|
426
|
+
The same server may also be represented by multiple entries (e.g. a node with private and public IP).`
|
427
|
+
},
|
428
|
+
/**
|
429
|
+
* The mode to use for patching the endpoints.
|
430
|
+
*
|
431
|
+
* - `prepend`: prepend the new endpoints to the existing ones (default);
|
432
|
+
* - `replace`: replace the existing endpoints with the new ones.
|
433
|
+
*/
|
434
|
+
endpointsPatchMode: Type5.Default(arrayPatchModeSchema, "prepend")
|
435
|
+
},
|
436
|
+
inputs: {
|
437
|
+
server: serverEntity,
|
438
|
+
endpoints: {
|
439
|
+
entity: l3EndpointEntity,
|
440
|
+
required: false,
|
441
|
+
multiple: true
|
442
|
+
}
|
443
|
+
},
|
444
|
+
outputs: {
|
445
|
+
server: serverEntity,
|
446
|
+
endpoints: {
|
447
|
+
entity: l3EndpointEntity,
|
448
|
+
multiple: true
|
449
|
+
}
|
450
|
+
},
|
451
|
+
meta: {
|
452
|
+
displayName: "Server Patch",
|
453
|
+
description: "Patches some properties of the server.",
|
454
|
+
primaryIcon: "mdi:server",
|
455
|
+
secondaryIcon: "fluent:patch-20-filled",
|
456
|
+
category: "Infrastructure"
|
457
|
+
},
|
458
|
+
source: {
|
459
|
+
package: "@highstate/common",
|
460
|
+
path: "units/server-patch"
|
461
|
+
}
|
462
|
+
});
|
463
|
+
var serverDns = defineUnit3({
|
464
|
+
type: "common.server-dns",
|
465
|
+
args: createArgs(),
|
466
|
+
inputs: {
|
467
|
+
server: serverEntity,
|
468
|
+
...inputs
|
469
|
+
},
|
470
|
+
outputs: {
|
471
|
+
server: serverEntity,
|
472
|
+
endpoints: {
|
473
|
+
entity: l3EndpointEntity,
|
474
|
+
multiple: true
|
475
|
+
}
|
476
|
+
},
|
477
|
+
meta: {
|
478
|
+
displayName: "Server DNS",
|
479
|
+
description: "Creates DNS records for the server and updates endpoints.",
|
480
|
+
primaryIcon: "mdi:server",
|
481
|
+
secondaryIcon: "mdi:dns",
|
482
|
+
category: "Infrastructure"
|
134
483
|
},
|
135
484
|
source: {
|
136
485
|
package: "@highstate/common",
|
137
|
-
path: "
|
486
|
+
path: "units/server-dns"
|
138
487
|
}
|
139
488
|
});
|
140
|
-
var script =
|
489
|
+
var script = defineUnit3({
|
141
490
|
type: "common.script",
|
142
491
|
args: {
|
143
|
-
script:
|
144
|
-
updateScript:
|
145
|
-
deleteScript:
|
492
|
+
script: Type5.String({ language: "shell" }),
|
493
|
+
updateScript: Type5.Optional(Type5.String({ language: "shell" })),
|
494
|
+
deleteScript: Type5.Optional(Type5.String({ language: "shell" }))
|
146
495
|
},
|
147
496
|
inputs: {
|
148
497
|
server: serverEntity
|
@@ -153,36 +502,37 @@ var script = defineUnit2({
|
|
153
502
|
meta: {
|
154
503
|
displayName: "Shell Script",
|
155
504
|
description: "Run a shell script on the server.",
|
156
|
-
primaryIcon: "mdi:bash"
|
505
|
+
primaryIcon: "mdi:bash",
|
506
|
+
category: "Infrastructure"
|
157
507
|
},
|
158
508
|
source: {
|
159
509
|
package: "@highstate/common",
|
160
|
-
path: "script"
|
510
|
+
path: "units/script"
|
161
511
|
}
|
162
512
|
});
|
163
|
-
var fileMetaEntity =
|
513
|
+
var fileMetaEntity = defineEntity4({
|
164
514
|
type: "common.file-meta",
|
165
|
-
schema:
|
166
|
-
name:
|
167
|
-
size:
|
168
|
-
|
169
|
-
|
515
|
+
schema: Type5.Object({
|
516
|
+
name: Type5.String(),
|
517
|
+
size: Type5.Number(),
|
518
|
+
mode: Type5.Number(),
|
519
|
+
isBinary: Type5.Optional(Type5.Boolean())
|
170
520
|
}),
|
171
521
|
meta: {
|
172
522
|
color: "#FF5722",
|
173
523
|
description: "Metadata for a file."
|
174
524
|
}
|
175
525
|
});
|
176
|
-
var fileContentEntity =
|
526
|
+
var fileContentEntity = defineEntity4({
|
177
527
|
type: "common.file-content",
|
178
|
-
schema:
|
179
|
-
|
180
|
-
type:
|
181
|
-
content:
|
528
|
+
schema: Type5.Union([
|
529
|
+
Type5.Object({
|
530
|
+
type: Type5.Literal("inline"),
|
531
|
+
content: Type5.String()
|
182
532
|
}),
|
183
|
-
|
184
|
-
type:
|
185
|
-
url:
|
533
|
+
Type5.Object({
|
534
|
+
type: Type5.Literal("remote"),
|
535
|
+
url: Type5.String()
|
186
536
|
})
|
187
537
|
]),
|
188
538
|
meta: {
|
@@ -190,9 +540,9 @@ var fileContentEntity = defineEntity2({
|
|
190
540
|
description: "The content of a file."
|
191
541
|
}
|
192
542
|
});
|
193
|
-
var fileEntity =
|
543
|
+
var fileEntity = defineEntity4({
|
194
544
|
type: "common.file",
|
195
|
-
schema:
|
545
|
+
schema: Type5.Object({
|
196
546
|
meta: fileMetaEntity.schema,
|
197
547
|
content: fileContentEntity.schema
|
198
548
|
}),
|
@@ -211,43 +561,43 @@ __export(proxmox_exports, {
|
|
211
561
|
imageEntity: () => imageEntity,
|
212
562
|
virtualMachine: () => virtualMachine
|
213
563
|
});
|
214
|
-
import { defineEntity as
|
215
|
-
var clusterEntity =
|
564
|
+
import { defineEntity as defineEntity5, defineUnit as defineUnit4, Type as Type6 } from "@highstate/contract";
|
565
|
+
var clusterEntity = defineEntity5({
|
216
566
|
type: "proxmox.cluster",
|
217
|
-
schema:
|
218
|
-
endpoint:
|
219
|
-
insecure:
|
220
|
-
username:
|
221
|
-
defaultNodeName:
|
222
|
-
defaultDatastoreId:
|
223
|
-
password:
|
224
|
-
apiToken:
|
567
|
+
schema: Type6.Object({
|
568
|
+
endpoint: Type6.String(),
|
569
|
+
insecure: Type6.Optional(Type6.Boolean()),
|
570
|
+
username: Type6.Optional(Type6.String()),
|
571
|
+
defaultNodeName: Type6.String(),
|
572
|
+
defaultDatastoreId: Type6.String(),
|
573
|
+
password: Type6.Optional(Type6.String()),
|
574
|
+
apiToken: Type6.Optional(Type6.String())
|
225
575
|
}),
|
226
576
|
meta: {
|
227
577
|
color: "#e56901"
|
228
578
|
}
|
229
579
|
});
|
230
|
-
var imageEntity =
|
580
|
+
var imageEntity = defineEntity5({
|
231
581
|
type: "proxmox.image",
|
232
|
-
schema:
|
233
|
-
id:
|
582
|
+
schema: Type6.Object({
|
583
|
+
id: Type6.String()
|
234
584
|
}),
|
235
585
|
meta: {
|
236
586
|
color: "#e56901"
|
237
587
|
}
|
238
588
|
});
|
239
|
-
var connection =
|
589
|
+
var connection = defineUnit4({
|
240
590
|
type: "proxmox.connection",
|
241
591
|
args: {
|
242
|
-
endpoint:
|
243
|
-
insecure:
|
244
|
-
username:
|
245
|
-
defaultNodeName:
|
246
|
-
defaultDatastoreId:
|
592
|
+
endpoint: Type6.String(),
|
593
|
+
insecure: Type6.Optional(Type6.Boolean()),
|
594
|
+
username: Type6.Optional(Type6.String()),
|
595
|
+
defaultNodeName: Type6.Optional(Type6.String()),
|
596
|
+
defaultDatastoreId: Type6.Optional(Type6.String())
|
247
597
|
},
|
248
598
|
secrets: {
|
249
|
-
password:
|
250
|
-
apiToken:
|
599
|
+
password: Type6.Optional(Type6.String()),
|
600
|
+
apiToken: Type6.Optional(Type6.String())
|
251
601
|
},
|
252
602
|
outputs: {
|
253
603
|
proxmoxCluster: clusterEntity
|
@@ -257,21 +607,20 @@ var connection = defineUnit3({
|
|
257
607
|
description: "The connection to an existing Proxmox cluster.",
|
258
608
|
category: "Proxmox",
|
259
609
|
primaryIcon: "simple-icons:proxmox",
|
260
|
-
primaryIconColor: "#e56901"
|
261
|
-
secondaryIcon: "codicon:vm"
|
610
|
+
primaryIconColor: "#e56901"
|
262
611
|
},
|
263
612
|
source: {
|
264
613
|
package: "@highstate/proxmox",
|
265
614
|
path: "connection"
|
266
615
|
}
|
267
616
|
});
|
268
|
-
var image =
|
617
|
+
var image = defineUnit4({
|
269
618
|
type: "proxmox.image",
|
270
619
|
args: {
|
271
|
-
url:
|
272
|
-
nodeName:
|
273
|
-
sha256:
|
274
|
-
datastoreId:
|
620
|
+
url: Type6.String(),
|
621
|
+
nodeName: Type6.Optional(Type6.String()),
|
622
|
+
sha256: Type6.Optional(Type6.String()),
|
623
|
+
datastoreId: Type6.Optional(Type6.String())
|
275
624
|
},
|
276
625
|
inputs: {
|
277
626
|
proxmoxCluster: clusterEntity
|
@@ -292,10 +641,13 @@ var image = defineUnit3({
|
|
292
641
|
path: "image"
|
293
642
|
}
|
294
643
|
});
|
295
|
-
var existingImage =
|
644
|
+
var existingImage = defineUnit4({
|
296
645
|
type: "proxmox.existing-image",
|
297
646
|
args: {
|
298
|
-
id:
|
647
|
+
id: Type6.String()
|
648
|
+
},
|
649
|
+
inputs: {
|
650
|
+
proxmoxCluster: clusterEntity
|
299
651
|
},
|
300
652
|
outputs: {
|
301
653
|
image: imageEntity
|
@@ -313,23 +665,26 @@ var existingImage = defineUnit3({
|
|
313
665
|
path: "existing-image"
|
314
666
|
}
|
315
667
|
});
|
316
|
-
var virtualMachine =
|
668
|
+
var virtualMachine = defineUnit4({
|
317
669
|
type: "proxmox.virtual-machine",
|
318
670
|
args: {
|
319
|
-
nodeName:
|
320
|
-
cpuType:
|
321
|
-
cores:
|
322
|
-
sockets:
|
323
|
-
memory:
|
324
|
-
ipv4:
|
325
|
-
ipv4Gateway:
|
326
|
-
dns:
|
327
|
-
datastoreId:
|
328
|
-
diskSize:
|
329
|
-
bridge:
|
330
|
-
sshPort:
|
331
|
-
sshUser:
|
332
|
-
waitForAgent:
|
671
|
+
nodeName: Type6.Optional(Type6.String()),
|
672
|
+
cpuType: Type6.Optional(Type6.String({ default: "host" })),
|
673
|
+
cores: Type6.Optional(Type6.Number({ default: 1 })),
|
674
|
+
sockets: Type6.Optional(Type6.Number({ default: 1 })),
|
675
|
+
memory: Type6.Optional(Type6.Number({ default: 512 })),
|
676
|
+
ipv4: Type6.Optional(Type6.String()),
|
677
|
+
ipv4Gateway: Type6.Optional(Type6.String()),
|
678
|
+
dns: Type6.Optional(Type6.Array(Type6.String())),
|
679
|
+
datastoreId: Type6.Optional(Type6.String()),
|
680
|
+
diskSize: Type6.Optional(Type6.Number({ default: 8 })),
|
681
|
+
bridge: Type6.Optional(Type6.String({ default: "vmbr0" })),
|
682
|
+
sshPort: Type6.Optional(Type6.Number({ default: 22 })),
|
683
|
+
sshUser: Type6.Optional(Type6.String({ default: "root" })),
|
684
|
+
waitForAgent: Type6.Optional(Type6.Boolean({ default: true }))
|
685
|
+
},
|
686
|
+
secrets: {
|
687
|
+
sshPassword: Type6.Optional(Type6.String())
|
333
688
|
},
|
334
689
|
inputs: {
|
335
690
|
proxmoxCluster: clusterEntity,
|
@@ -339,12 +694,7 @@ var virtualMachine = defineUnit3({
|
|
339
694
|
required: false
|
340
695
|
}
|
341
696
|
},
|
342
|
-
|
343
|
-
sshPassword: Type3.Optional(Type3.String())
|
344
|
-
},
|
345
|
-
outputs: {
|
346
|
-
server: serverEntity
|
347
|
-
},
|
697
|
+
outputs: serverOutputs,
|
348
698
|
meta: {
|
349
699
|
displayName: "Proxmox Virtual Machine",
|
350
700
|
description: "The virtual machine on a Proxmox cluster.",
|
@@ -365,224 +715,298 @@ __export(k8s_exports, {
|
|
365
715
|
accessPoint: () => accessPoint,
|
366
716
|
accessPointEntity: () => accessPointEntity,
|
367
717
|
certManager: () => certManager,
|
718
|
+
clusterDns: () => clusterDns,
|
368
719
|
clusterEntity: () => clusterEntity2,
|
369
|
-
|
370
|
-
|
720
|
+
clusterInfoProperties: () => clusterInfoProperties,
|
721
|
+
clusterInputs: () => clusterInputs,
|
722
|
+
clusterOutputs: () => clusterOutputs,
|
723
|
+
clusterPatch: () => clusterPatch,
|
724
|
+
clusterQuirksSchema: () => clusterQuirksSchema,
|
725
|
+
cniSchema: () => cniSchema,
|
371
726
|
deploymentEntity: () => deploymentEntity,
|
372
|
-
deploymentSpecSchema: () => deploymentSpecSchema,
|
373
727
|
dns01TlsIssuer: () => dns01TlsIssuer,
|
374
728
|
existingCluster: () => existingCluster,
|
729
|
+
exposableWorkloadEntity: () => exposableWorkloadEntity,
|
730
|
+
externalServiceTypeSchema: () => externalServiceTypeSchema,
|
731
|
+
fallbackKubeApiAccessSchema: () => fallbackKubeApiAccessSchema,
|
375
732
|
gatewayApi: () => gatewayApi,
|
376
733
|
gatewayEntity: () => gatewayEntity,
|
377
734
|
interfaceEntity: () => interfaceEntity,
|
378
735
|
internalIpsPolicySchema: () => internalIpsPolicySchema,
|
379
|
-
labelSelectorSchema: () => labelSelectorSchema,
|
380
736
|
metadataSchema: () => metadataSchema,
|
381
737
|
persistentVolumeClaimEntity: () => persistentVolumeClaimEntity,
|
738
|
+
resourceSchema: () => resourceSchema,
|
739
|
+
scheduleOnMastersPolicyArgs: () => scheduleOnMastersPolicyArgs,
|
740
|
+
scheduleOnMastersPolicySchema: () => scheduleOnMastersPolicySchema,
|
382
741
|
serviceEntity: () => serviceEntity,
|
383
|
-
servicePortSchema: () => servicePortSchema,
|
384
|
-
serviceSpecSchema: () => serviceSpecSchema,
|
385
742
|
serviceTypeSchema: () => serviceTypeSchema,
|
386
|
-
sharedClusterArgs: () => sharedClusterArgs,
|
387
743
|
statefulSetEntity: () => statefulSetEntity,
|
388
744
|
tlsIssuerEntity: () => tlsIssuerEntity,
|
389
745
|
tunDevicePolicySchema: () => tunDevicePolicySchema
|
390
746
|
});
|
391
|
-
import { defineEntity as
|
747
|
+
import { defineEntity as defineEntity6, defineUnit as defineUnit5, Type as Type7 } from "@highstate/contract";
|
392
748
|
import { Literal } from "@sinclair/typebox";
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
__export(dns_exports, {
|
397
|
-
providerEntity: () => providerEntity,
|
398
|
-
record: () => record
|
749
|
+
var fallbackKubeApiAccessSchema = Type7.Object({
|
750
|
+
serverIp: Type7.String(),
|
751
|
+
serverPort: Type7.Number()
|
399
752
|
});
|
400
|
-
|
401
|
-
|
402
|
-
type: "dns.provider",
|
403
|
-
schema: Type4.Object({
|
404
|
-
name: Type4.String(),
|
405
|
-
type: Type4.String(),
|
406
|
-
data: Type4.Record(Type4.String(), Type4.Unknown()),
|
407
|
-
domain: Type4.String()
|
408
|
-
}),
|
409
|
-
meta: {
|
410
|
-
color: "#FF5722"
|
411
|
-
}
|
412
|
-
});
|
413
|
-
var record = defineUnit4({
|
414
|
-
type: "common.dns-record",
|
415
|
-
args: {
|
416
|
-
name: Type4.String(),
|
417
|
-
type: Type4.String(),
|
418
|
-
value: Type4.String(),
|
419
|
-
ttl: Type4.Optional(Type4.Number())
|
420
|
-
},
|
421
|
-
inputs: {
|
422
|
-
dnsProvider: providerEntity
|
423
|
-
},
|
424
|
-
meta: {
|
425
|
-
displayName: "DNS Record",
|
426
|
-
description: "A DNS record to create.",
|
427
|
-
primaryIcon: "mdi:server",
|
428
|
-
defaultNamePrefix: "record"
|
429
|
-
},
|
430
|
-
source: {
|
431
|
-
package: "@highstate/common",
|
432
|
-
path: "dns/record"
|
433
|
-
}
|
434
|
-
});
|
435
|
-
|
436
|
-
// src/k8s.ts
|
437
|
-
var tunDevicePolicySchema = Type5.Union([
|
438
|
-
Type5.Object({
|
753
|
+
var tunDevicePolicySchema = Type7.Union([
|
754
|
+
Type7.Object({
|
439
755
|
type: Literal("host")
|
440
756
|
}),
|
441
|
-
|
757
|
+
Type7.Object({
|
442
758
|
type: Literal("plugin"),
|
443
|
-
resourceName:
|
444
|
-
resourceValue:
|
759
|
+
resourceName: Type7.String(),
|
760
|
+
resourceValue: Type7.String()
|
445
761
|
})
|
446
762
|
]);
|
447
|
-
var
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
763
|
+
var externalServiceTypeSchema = Type7.StringEnum(["NodePort", "LoadBalancer"]);
|
764
|
+
var scheduleOnMastersPolicySchema = Type7.StringEnum(["always", "when-no-workers", "never"]);
|
765
|
+
var cniSchema = Type7.StringEnum(["cilium", "other"]);
|
766
|
+
var clusterQuirksSchema = Type7.Object({
|
767
|
+
/**
|
768
|
+
* The IP and port of the kube-apiserver available from the cluster.
|
769
|
+
*
|
770
|
+
* Will be used to create fallback network policy in CNIs which does not support allowing access to the kube-apiserver.
|
771
|
+
*
|
772
|
+
* @schema
|
773
|
+
*/
|
774
|
+
fallbackKubeApiAccess: {
|
775
|
+
...Type7.Optional(fallbackKubeApiAccessSchema),
|
776
|
+
description: `The IP and port of the kube-apiserver available from the cluster.
|
777
|
+
|
778
|
+
Will be used to create fallback network policy in CNIs which does not support allowing access to the kube-apiserver.`
|
779
|
+
},
|
455
780
|
/**
|
456
781
|
* Specifies the policy for using the tun device inside containers.
|
457
782
|
*
|
458
783
|
* If not provided, the default policy is `host` which assumes just mounting /dev/net/tun from the host.
|
459
784
|
*
|
460
785
|
* For some runtimes, like Talos's one, the /dev/net/tun device is not available in the host, so the plugin policy should be used.
|
786
|
+
*
|
787
|
+
* @schema
|
461
788
|
*/
|
462
|
-
tunDevicePolicy:
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
clusterIPs: Type5.Optional(Type5.Array(Type5.String())),
|
483
|
-
externalIPs: Type5.Optional(Type5.Array(Type5.String()))
|
484
|
-
});
|
485
|
-
var serviceEntity = defineEntity5({
|
486
|
-
type: "k8s.service",
|
487
|
-
schema: Type5.Object({
|
488
|
-
type: Type5.Literal("k8s.service"),
|
489
|
-
clusterInfo: clusterInfoSchema,
|
490
|
-
metadata: metadataSchema,
|
491
|
-
spec: serviceSpecSchema
|
492
|
-
}),
|
493
|
-
meta: {
|
494
|
-
color: "#2196F3"
|
495
|
-
}
|
496
|
-
});
|
497
|
-
var clusterEntity2 = defineEntity5({
|
498
|
-
type: "k8s.cluster",
|
499
|
-
schema: Type5.Object({
|
500
|
-
info: clusterInfoSchema,
|
501
|
-
kubeconfig: Type5.String()
|
502
|
-
}),
|
503
|
-
meta: {
|
504
|
-
color: "#2196F3"
|
789
|
+
tunDevicePolicy: {
|
790
|
+
...Type7.Optional(tunDevicePolicySchema),
|
791
|
+
description: `Specifies the policy for using the tun device inside containers.
|
792
|
+
|
793
|
+
If not provided, the default policy is \`host\` which assumes just mounting /dev/net/tun from the host.
|
794
|
+
|
795
|
+
For some runtimes, like Talos's one, the /dev/net/tun device is not available in the host, so the plugin policy should be used.`
|
796
|
+
},
|
797
|
+
/**
|
798
|
+
* The service type to use for external services.
|
799
|
+
*
|
800
|
+
* If not provided, the default service type is `NodePort` since `LoadBalancer` may not be available.
|
801
|
+
*
|
802
|
+
* @schema
|
803
|
+
*/
|
804
|
+
externalServiceType: {
|
805
|
+
...Type7.Optional(externalServiceTypeSchema),
|
806
|
+
description: `The service type to use for external services.
|
807
|
+
|
808
|
+
If not provided, the default service type is \`NodePort\` since \`LoadBalancer\` may not be available.`
|
505
809
|
}
|
506
810
|
});
|
507
|
-
var
|
508
|
-
var sharedClusterArgs = {
|
811
|
+
var clusterInfoProperties = {
|
509
812
|
/**
|
510
|
-
* The
|
813
|
+
* The unique identifier of the cluster.
|
511
814
|
*
|
512
|
-
*
|
815
|
+
* Should be defined as a UUID of the `kube-system` namespace which is always present in the cluster.
|
513
816
|
*
|
514
817
|
* @schema
|
515
818
|
*/
|
516
|
-
|
517
|
-
...
|
518
|
-
description: `The
|
819
|
+
id: {
|
820
|
+
...Type7.String(),
|
821
|
+
description: `The unique identifier of the cluster.
|
519
822
|
|
520
|
-
|
823
|
+
Should be defined as a UUID of the \`kube-system\` namespace which is always present in the cluster.`
|
824
|
+
},
|
825
|
+
/**
|
826
|
+
* The name of the cluster.
|
827
|
+
*
|
828
|
+
* @schema
|
829
|
+
*/
|
830
|
+
name: {
|
831
|
+
...Type7.String(),
|
832
|
+
description: `The name of the cluster.`
|
521
833
|
},
|
522
834
|
/**
|
523
|
-
* The
|
835
|
+
* The name of the CNI plugin used by the cluster.
|
524
836
|
*
|
525
|
-
*
|
526
|
-
* - `
|
527
|
-
* - `
|
837
|
+
* Supported values are:
|
838
|
+
* - `cilium`
|
839
|
+
* - `other`
|
528
840
|
*
|
529
841
|
* @schema
|
530
842
|
*/
|
531
|
-
|
532
|
-
...
|
533
|
-
description: `The
|
843
|
+
cni: {
|
844
|
+
...cniSchema,
|
845
|
+
description: `The name of the CNI plugin used by the cluster.
|
534
846
|
|
535
|
-
|
536
|
-
- \`
|
537
|
-
- \`
|
847
|
+
Supported values are:
|
848
|
+
- \`cilium\`
|
849
|
+
- \`other\``
|
538
850
|
},
|
539
851
|
/**
|
540
|
-
* The
|
852
|
+
* The endpoints of the cluster nodes.
|
853
|
+
*
|
854
|
+
* The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
541
855
|
*
|
542
|
-
*
|
856
|
+
* The same node may also be represented by multiple entries (e.g. a node with private and public IP).
|
543
857
|
*
|
544
858
|
* @schema
|
545
859
|
*/
|
546
|
-
|
547
|
-
...
|
548
|
-
description: `The
|
860
|
+
endpoints: {
|
861
|
+
...Type7.Array(l3EndpointEntity.schema),
|
862
|
+
description: `The endpoints of the cluster nodes.
|
863
|
+
|
864
|
+
The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
549
865
|
|
550
|
-
|
866
|
+
The same node may also be represented by multiple entries (e.g. a node with private and public IP).`
|
867
|
+
},
|
868
|
+
/**
|
869
|
+
* The endpoints of the API server.
|
870
|
+
*
|
871
|
+
* The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
872
|
+
*
|
873
|
+
* The same node may also be represented by multiple entries (e.g. a node with private and public IP).
|
874
|
+
*/
|
875
|
+
apiEndpoints: Type7.Array(l4EndpointEntity.schema),
|
876
|
+
/**
|
877
|
+
* The external IPs of the cluster nodes allowed to be used for external access.
|
878
|
+
*
|
879
|
+
* @schema
|
880
|
+
*/
|
881
|
+
externalIps: {
|
882
|
+
...Type7.Array(Type7.String()),
|
883
|
+
description: `The external IPs of the cluster nodes allowed to be used for external access.`
|
551
884
|
},
|
552
885
|
/**
|
553
|
-
*
|
886
|
+
* The extra quirks of the cluster to improve compatibility.
|
887
|
+
*
|
888
|
+
* @schema
|
889
|
+
*/
|
890
|
+
quirks: {
|
891
|
+
...Type7.Optional(clusterQuirksSchema),
|
892
|
+
description: `The extra quirks of the cluster to improve compatibility.`
|
893
|
+
}
|
894
|
+
};
|
895
|
+
var serviceTypeSchema = Type7.StringEnum(["NodePort", "LoadBalancer", "ClusterIP"]);
|
896
|
+
var metadataSchema = Type7.Object({
|
897
|
+
name: Type7.String(),
|
898
|
+
namespace: Type7.String(),
|
899
|
+
labels: Type7.Optional(Type7.Record(Type7.String(), Type7.String())),
|
900
|
+
annotations: Type7.Optional(Type7.Record(Type7.String(), Type7.String()))
|
901
|
+
});
|
902
|
+
var resourceSchema = Type7.Object({
|
903
|
+
clusterId: Type7.String(),
|
904
|
+
metadata: metadataSchema
|
905
|
+
});
|
906
|
+
var serviceEntity = defineEntity6({
|
907
|
+
type: "k8s.service",
|
908
|
+
schema: Type7.Object({
|
909
|
+
type: Type7.Literal("k8s.service"),
|
910
|
+
...resourceSchema.properties,
|
911
|
+
endpoints: Type7.Array(l4EndpointEntity.schema)
|
912
|
+
}),
|
913
|
+
meta: {
|
914
|
+
color: "#2196F3"
|
915
|
+
}
|
916
|
+
});
|
917
|
+
var clusterEntity2 = defineEntity6({
|
918
|
+
type: "k8s.cluster",
|
919
|
+
schema: Type7.Object({
|
920
|
+
...clusterInfoProperties,
|
921
|
+
kubeconfig: Type7.String()
|
922
|
+
}),
|
923
|
+
meta: {
|
924
|
+
color: "#2196F3"
|
925
|
+
}
|
926
|
+
});
|
927
|
+
var internalIpsPolicySchema = Type7.StringEnum(["always", "public", "never"]);
|
928
|
+
var scheduleOnMastersPolicyArgs = {
|
929
|
+
/**
|
930
|
+
* The policy for scheduling workloads on master nodes.
|
554
931
|
*
|
555
|
-
*
|
932
|
+
* - `always`: always schedule workloads on master nodes regardless of the number of workers;
|
933
|
+
* - `when-no-workers`: schedule workloads on master nodes only if there are no workers (default);
|
934
|
+
* - `never`: never schedule workloads on master nodes.
|
556
935
|
*
|
557
936
|
* @schema
|
558
937
|
*/
|
559
|
-
|
560
|
-
...
|
561
|
-
description: `
|
938
|
+
scheduleOnMastersPolicy: {
|
939
|
+
...Type7.Default(scheduleOnMastersPolicySchema, "when-no-workers"),
|
940
|
+
description: `The policy for scheduling workloads on master nodes.
|
562
941
|
|
563
|
-
|
942
|
+
- \`always\`: always schedule workloads on master nodes regardless of the number of workers;
|
943
|
+
- \`when-no-workers\`: schedule workloads on master nodes only if there are no workers (default);
|
944
|
+
- \`never\`: never schedule workloads on master nodes.`
|
945
|
+
}
|
946
|
+
};
|
947
|
+
var clusterInputs = {
|
948
|
+
masters: {
|
949
|
+
entity: serverEntity,
|
950
|
+
multiple: true
|
951
|
+
},
|
952
|
+
workers: {
|
953
|
+
entity: serverEntity,
|
954
|
+
multiple: true,
|
955
|
+
required: false
|
956
|
+
}
|
957
|
+
};
|
958
|
+
var clusterOutputs = {
|
959
|
+
k8sCluster: clusterEntity2,
|
960
|
+
apiEndpoints: {
|
961
|
+
entity: l4EndpointEntity,
|
962
|
+
multiple: true
|
963
|
+
},
|
964
|
+
endpoints: {
|
965
|
+
entity: l3EndpointEntity,
|
966
|
+
multiple: true
|
564
967
|
}
|
565
968
|
};
|
566
969
|
var existingCluster = defineUnit5({
|
567
970
|
type: "k8s.existing-cluster",
|
568
971
|
args: {
|
569
|
-
...sharedClusterArgs,
|
570
972
|
/**
|
571
|
-
* The
|
572
|
-
*
|
573
|
-
* If not provided, the default policy is `host` which assumes just mounting /dev/net/tun from the host.
|
973
|
+
* The list of external IPs of the cluster nodes allowed to be used for external access.
|
574
974
|
*
|
575
|
-
*
|
975
|
+
* If not provided, will be automatically detected by querying the cluster nodes.
|
576
976
|
*
|
577
977
|
* @schema
|
578
978
|
*/
|
579
|
-
|
580
|
-
...
|
581
|
-
description: `The
|
979
|
+
externalIps: {
|
980
|
+
...Type7.Optional(Type7.Array(Type7.String())),
|
981
|
+
description: `The list of external IPs of the cluster nodes allowed to be used for external access.
|
582
982
|
|
583
|
-
If not provided,
|
983
|
+
If not provided, will be automatically detected by querying the cluster nodes.`
|
984
|
+
},
|
985
|
+
/**
|
986
|
+
* The policy for using internal IPs of the nodes as external IPs.
|
987
|
+
*
|
988
|
+
* - `always`: always use internal IPs as external IPs;
|
989
|
+
* - `public`: use internal IPs as external IPs only if they are (theoretically) routable from the public internet **(default)**;
|
990
|
+
* - `never`: never use internal IPs as external IPs.
|
991
|
+
*
|
992
|
+
* @schema
|
993
|
+
*/
|
994
|
+
internalIpsPolicy: {
|
995
|
+
...Type7.Default(internalIpsPolicySchema, "public"),
|
996
|
+
description: `The policy for using internal IPs of the nodes as external IPs.
|
584
997
|
|
585
|
-
|
998
|
+
- \`always\`: always use internal IPs as external IPs;
|
999
|
+
- \`public\`: use internal IPs as external IPs only if they are (theoretically) routable from the public internet **(default)**;
|
1000
|
+
- \`never\`: never use internal IPs as external IPs.`
|
1001
|
+
},
|
1002
|
+
/**
|
1003
|
+
* The extra quirks of the cluster to improve compatibility.
|
1004
|
+
*
|
1005
|
+
* @schema
|
1006
|
+
*/
|
1007
|
+
quirks: {
|
1008
|
+
...Type7.Optional(clusterQuirksSchema),
|
1009
|
+
description: `The extra quirks of the cluster to improve compatibility.`
|
586
1010
|
}
|
587
1011
|
},
|
588
1012
|
secrets: {
|
@@ -594,55 +1018,155 @@ var existingCluster = defineUnit5({
|
|
594
1018
|
* @schema
|
595
1019
|
*/
|
596
1020
|
kubeconfig: {
|
597
|
-
...
|
1021
|
+
...Type7.Record(Type7.String(), Type7.Any()),
|
598
1022
|
description: `The kubeconfig of the cluster to use for connecting to the cluster.
|
599
1023
|
|
600
1024
|
Will be available for all components using \`cluster\` output of this unit.`
|
601
1025
|
}
|
602
1026
|
},
|
603
|
-
outputs:
|
604
|
-
|
1027
|
+
outputs: clusterOutputs,
|
1028
|
+
meta: {
|
1029
|
+
displayName: "Existing Cluster",
|
1030
|
+
description: "An existing Kubernetes cluster.",
|
1031
|
+
primaryIcon: "devicon:kubernetes",
|
1032
|
+
category: "Kubernetes"
|
1033
|
+
},
|
1034
|
+
source: {
|
1035
|
+
package: "@highstate/k8s",
|
1036
|
+
path: "units/existing-cluster"
|
1037
|
+
}
|
1038
|
+
});
|
1039
|
+
var clusterPatch = defineUnit5({
|
1040
|
+
type: "k8s.cluster-patch",
|
1041
|
+
args: {
|
1042
|
+
/**
|
1043
|
+
* The endpoints of the API server.
|
1044
|
+
*
|
1045
|
+
* The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
1046
|
+
*
|
1047
|
+
* The same node may also be represented by multiple entries (e.g. a node with private and public IP).
|
1048
|
+
*
|
1049
|
+
* @schema
|
1050
|
+
*/
|
1051
|
+
apiEndpoints: {
|
1052
|
+
...Type7.Default(Type7.Array(Type7.String()), []),
|
1053
|
+
description: `The endpoints of the API server.
|
1054
|
+
|
1055
|
+
The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
1056
|
+
|
1057
|
+
The same node may also be represented by multiple entries (e.g. a node with private and public IP).`
|
1058
|
+
},
|
1059
|
+
/**
|
1060
|
+
* The mode to use for patching the API endpoints.
|
1061
|
+
*
|
1062
|
+
* - `prepend`: prepend the new endpoints to the existing ones (default);
|
1063
|
+
* - `replace`: replace the existing endpoints with the new ones.
|
1064
|
+
*/
|
1065
|
+
apiEndpointsPatchMode: Type7.Default(arrayPatchModeSchema, "prepend"),
|
1066
|
+
/**
|
1067
|
+
* The endpoints of the cluster nodes.
|
1068
|
+
*
|
1069
|
+
* The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
1070
|
+
*
|
1071
|
+
* The same node may also be represented by multiple entries (e.g. a node with private and public IP).
|
1072
|
+
*
|
1073
|
+
* @schema
|
1074
|
+
*/
|
1075
|
+
endpoints: {
|
1076
|
+
...Type7.Default(Type7.Array(Type7.String()), []),
|
1077
|
+
description: `The endpoints of the cluster nodes.
|
1078
|
+
|
1079
|
+
The entry may represent real node endpoint or virtual endpoint (like a load balancer).
|
1080
|
+
|
1081
|
+
The same node may also be represented by multiple entries (e.g. a node with private and public IP).`
|
1082
|
+
},
|
1083
|
+
/**
|
1084
|
+
* The mode to use for patching the endpoints.
|
1085
|
+
*
|
1086
|
+
* - `prepend`: prepend the new endpoints to the existing ones (default);
|
1087
|
+
* - `replace`: replace the existing endpoints with the new ones.
|
1088
|
+
*/
|
1089
|
+
endpointsPatchMode: Type7.Default(arrayPatchModeSchema, "prepend")
|
1090
|
+
},
|
1091
|
+
inputs: {
|
1092
|
+
k8sCluster: clusterEntity2,
|
1093
|
+
apiEndpoints: {
|
1094
|
+
entity: l4EndpointEntity,
|
1095
|
+
required: false,
|
1096
|
+
multiple: true
|
1097
|
+
},
|
1098
|
+
endpoints: {
|
1099
|
+
entity: l3EndpointEntity,
|
1100
|
+
required: false,
|
1101
|
+
multiple: true
|
1102
|
+
}
|
1103
|
+
},
|
1104
|
+
outputs: clusterOutputs,
|
1105
|
+
meta: {
|
1106
|
+
displayName: "Cluster Patch",
|
1107
|
+
description: "Patches some properties of the cluster.",
|
1108
|
+
primaryIcon: "devicon:kubernetes",
|
1109
|
+
secondaryIcon: "fluent:patch-20-filled",
|
1110
|
+
category: "Kubernetes"
|
1111
|
+
},
|
1112
|
+
source: {
|
1113
|
+
package: "@highstate/k8s",
|
1114
|
+
path: "units/cluster-patch"
|
1115
|
+
}
|
1116
|
+
});
|
1117
|
+
var clusterDns = defineUnit5({
|
1118
|
+
type: "cluster-dns",
|
1119
|
+
args: {
|
1120
|
+
...createArgs(),
|
1121
|
+
...createArgs("api")
|
1122
|
+
},
|
1123
|
+
inputs: {
|
1124
|
+
k8sCluster: clusterEntity2,
|
1125
|
+
...inputs
|
605
1126
|
},
|
1127
|
+
outputs: clusterOutputs,
|
606
1128
|
meta: {
|
607
|
-
displayName: "
|
608
|
-
description: "
|
609
|
-
primaryIcon: "
|
1129
|
+
displayName: "Cluster DNS",
|
1130
|
+
description: "Creates DNS records for the cluster and updates endpoints.",
|
1131
|
+
primaryIcon: "devicon:kubernetes",
|
1132
|
+
secondaryIcon: "mdi:dns",
|
1133
|
+
category: "Kubernetes"
|
610
1134
|
},
|
611
1135
|
source: {
|
612
1136
|
package: "@highstate/k8s",
|
613
|
-
path: "units/
|
1137
|
+
path: "units/cluster-dns"
|
614
1138
|
}
|
615
1139
|
});
|
616
|
-
var gatewayEntity =
|
1140
|
+
var gatewayEntity = defineEntity6({
|
617
1141
|
type: "k8s.gateway",
|
618
|
-
schema:
|
619
|
-
|
620
|
-
gatewayClassName:
|
621
|
-
httpListenerPort:
|
622
|
-
httpsListenerPort:
|
623
|
-
|
624
|
-
service: Type5.Optional(serviceEntity.schema)
|
1142
|
+
schema: Type7.Object({
|
1143
|
+
clusterId: Type7.String(),
|
1144
|
+
gatewayClassName: Type7.String(),
|
1145
|
+
httpListenerPort: Type7.Number(),
|
1146
|
+
httpsListenerPort: Type7.Number(),
|
1147
|
+
endpoints: Type7.Array(l3EndpointEntity.schema)
|
625
1148
|
}),
|
626
1149
|
meta: {
|
627
1150
|
color: "#4CAF50"
|
628
1151
|
}
|
629
1152
|
});
|
630
|
-
var tlsIssuerEntity =
|
1153
|
+
var tlsIssuerEntity = defineEntity6({
|
631
1154
|
type: "k8s.tls-issuer",
|
632
|
-
schema:
|
633
|
-
|
634
|
-
clusterIssuerName:
|
1155
|
+
schema: Type7.Object({
|
1156
|
+
clusterId: Type7.String(),
|
1157
|
+
clusterIssuerName: Type7.String()
|
635
1158
|
}),
|
636
1159
|
meta: {
|
637
1160
|
color: "#f06292"
|
638
1161
|
}
|
639
1162
|
});
|
640
|
-
var accessPointEntity =
|
1163
|
+
var accessPointEntity = defineEntity6({
|
641
1164
|
type: "k8s.access-point",
|
642
|
-
schema:
|
1165
|
+
schema: Type7.Object({
|
1166
|
+
clusterId: Type7.String(),
|
643
1167
|
gateway: gatewayEntity.schema,
|
644
1168
|
tlsIssuer: tlsIssuerEntity.schema,
|
645
|
-
dnsProviders:
|
1169
|
+
dnsProviders: Type7.Array(providerEntity.schema)
|
646
1170
|
}),
|
647
1171
|
meta: {
|
648
1172
|
color: "#F57F17"
|
@@ -664,7 +1188,8 @@ var accessPoint = defineUnit5({
|
|
664
1188
|
meta: {
|
665
1189
|
displayName: "Access Point",
|
666
1190
|
description: "An access point which can be used to connect to services.",
|
667
|
-
primaryIcon: "mdi:access-point"
|
1191
|
+
primaryIcon: "mdi:access-point",
|
1192
|
+
category: "Kubernetes"
|
668
1193
|
},
|
669
1194
|
source: {
|
670
1195
|
package: "@highstate/k8s",
|
@@ -682,7 +1207,8 @@ var certManager = defineUnit5({
|
|
682
1207
|
meta: {
|
683
1208
|
displayName: "Cert Manager",
|
684
1209
|
description: "A certificate manager for managing TLS certificates.",
|
685
|
-
primaryIcon: "simple-icons:letsencrypt"
|
1210
|
+
primaryIcon: "simple-icons:letsencrypt",
|
1211
|
+
category: "Kubernetes"
|
686
1212
|
},
|
687
1213
|
source: {
|
688
1214
|
package: "@highstate/k8s",
|
@@ -700,7 +1226,7 @@ var dns01TlsIssuer = defineUnit5({
|
|
700
1226
|
* @schema
|
701
1227
|
*/
|
702
1228
|
domains: {
|
703
|
-
...
|
1229
|
+
...Type7.Optional(Type7.Array(Type7.String())),
|
704
1230
|
description: `The top-level domains to filter the DNS01 challenge for.
|
705
1231
|
|
706
1232
|
If not provided, will use all domains passed to the DNS providers.`
|
@@ -719,70 +1245,58 @@ var dns01TlsIssuer = defineUnit5({
|
|
719
1245
|
meta: {
|
720
1246
|
displayName: "DNS01 Issuer",
|
721
1247
|
description: "A TLS issuer for issuing certificate using DNS01 challenge.",
|
722
|
-
primaryIcon: "mdi:certificate"
|
1248
|
+
primaryIcon: "mdi:certificate",
|
1249
|
+
category: "Kubernetes"
|
723
1250
|
},
|
724
1251
|
source: {
|
725
1252
|
package: "@highstate/k8s",
|
726
1253
|
path: "units/dns01-issuer"
|
727
1254
|
}
|
728
1255
|
});
|
729
|
-
var
|
730
|
-
name: Type5.String(),
|
731
|
-
image: Type5.String()
|
732
|
-
});
|
733
|
-
var labelSelectorSchema = Type5.Object({
|
734
|
-
matchLabels: Type5.Record(Type5.String(), Type5.String())
|
735
|
-
});
|
736
|
-
var deploymentSpecSchema = Type5.Object({
|
737
|
-
replicas: Type5.Number(),
|
738
|
-
selector: labelSelectorSchema,
|
739
|
-
template: Type5.Object({
|
740
|
-
metadata: metadataSchema,
|
741
|
-
spec: Type5.Object({
|
742
|
-
containers: Type5.Array(containerSchema)
|
743
|
-
})
|
744
|
-
})
|
745
|
-
});
|
746
|
-
var deploymentEntity = defineEntity5({
|
1256
|
+
var deploymentEntity = defineEntity6({
|
747
1257
|
type: "k8s.deployment",
|
748
|
-
schema:
|
749
|
-
type:
|
750
|
-
|
751
|
-
|
752
|
-
service: Type5.Optional(serviceEntity.schema)
|
1258
|
+
schema: Type7.Object({
|
1259
|
+
type: Type7.Literal("k8s.deployment"),
|
1260
|
+
...resourceSchema.properties,
|
1261
|
+
service: Type7.Optional(serviceEntity.schema)
|
753
1262
|
}),
|
754
1263
|
meta: {
|
755
1264
|
color: "#4CAF50"
|
756
1265
|
}
|
757
1266
|
});
|
758
|
-
var statefulSetEntity =
|
1267
|
+
var statefulSetEntity = defineEntity6({
|
759
1268
|
type: "k8s.stateful-set",
|
760
|
-
schema:
|
761
|
-
type:
|
762
|
-
|
763
|
-
|
764
|
-
service: Type5.Optional(serviceEntity.schema)
|
1269
|
+
schema: Type7.Object({
|
1270
|
+
type: Type7.Literal("k8s.stateful-set"),
|
1271
|
+
...resourceSchema.properties,
|
1272
|
+
service: serviceEntity.schema
|
765
1273
|
}),
|
766
1274
|
meta: {
|
767
1275
|
color: "#FFC107"
|
768
1276
|
}
|
769
1277
|
});
|
770
|
-
var
|
1278
|
+
var exposableWorkloadEntity = defineEntity6({
|
1279
|
+
type: "k8s.exposable-workload",
|
1280
|
+
schema: Type7.Union([deploymentEntity.schema, statefulSetEntity.schema]),
|
1281
|
+
meta: {
|
1282
|
+
color: "#4CAF50"
|
1283
|
+
}
|
1284
|
+
});
|
1285
|
+
var persistentVolumeClaimEntity = defineEntity6({
|
771
1286
|
type: "k8s.persistent-volume-claim",
|
772
|
-
schema:
|
773
|
-
type:
|
774
|
-
|
775
|
-
metadata: metadataSchema
|
1287
|
+
schema: Type7.Object({
|
1288
|
+
type: Type7.Literal("k8s.persistent-volume-claim"),
|
1289
|
+
...resourceSchema.properties
|
776
1290
|
}),
|
777
1291
|
meta: {
|
778
1292
|
color: "#FFC107"
|
779
1293
|
}
|
780
1294
|
});
|
781
|
-
var interfaceEntity =
|
1295
|
+
var interfaceEntity = defineEntity6({
|
782
1296
|
type: "k8s.interface",
|
783
|
-
schema:
|
784
|
-
name:
|
785
|
-
|
1297
|
+
schema: Type7.Object({
|
1298
|
+
name: Type7.String(),
|
1299
|
+
workload: exposableWorkloadEntity.schema
|
786
1300
|
}),
|
787
1301
|
meta: {
|
788
1302
|
color: "#2196F3",
|
@@ -800,8 +1314,10 @@ var gatewayApi = defineUnit5({
|
|
800
1314
|
meta: {
|
801
1315
|
displayName: "Gateway API",
|
802
1316
|
description: "Installs the Gateway API CRDs to the cluster.",
|
803
|
-
primaryIcon: "
|
804
|
-
|
1317
|
+
primaryIcon: "devicon:kubernetes",
|
1318
|
+
secondaryIcon: "mdi:api",
|
1319
|
+
secondaryIconColor: "#4CAF50",
|
1320
|
+
category: "Kubernetes"
|
805
1321
|
},
|
806
1322
|
source: {
|
807
1323
|
package: "@highstate/k8s",
|
@@ -814,55 +1330,26 @@ var talos_exports = {};
|
|
814
1330
|
__export(talos_exports, {
|
815
1331
|
cluster: () => cluster,
|
816
1332
|
clusterEntity: () => clusterEntity3,
|
817
|
-
cniSchema: () =>
|
1333
|
+
cniSchema: () => cniSchema2,
|
818
1334
|
csiSchema: () => csiSchema
|
819
1335
|
});
|
820
|
-
import { defineEntity as
|
821
|
-
var clusterEntity3 =
|
1336
|
+
import { defineEntity as defineEntity7, defineUnit as defineUnit6, Type as Type8 } from "@highstate/contract";
|
1337
|
+
var clusterEntity3 = defineEntity7({
|
822
1338
|
type: "talos.cluster",
|
823
|
-
schema:
|
824
|
-
clientConfiguration:
|
825
|
-
machineSecrets:
|
1339
|
+
schema: Type8.Object({
|
1340
|
+
clientConfiguration: Type8.String(),
|
1341
|
+
machineSecrets: Type8.String()
|
826
1342
|
}),
|
827
1343
|
meta: {
|
828
1344
|
color: "#2d2d2d"
|
829
1345
|
}
|
830
1346
|
});
|
831
|
-
var
|
832
|
-
var csiSchema =
|
1347
|
+
var cniSchema2 = Type8.StringEnum(["none", "cilium", "flannel"]);
|
1348
|
+
var csiSchema = Type8.StringEnum(["none", "local-path-provisioner"]);
|
833
1349
|
var cluster = defineUnit6({
|
834
1350
|
type: "talos.cluster",
|
835
1351
|
args: {
|
836
|
-
|
837
|
-
* Allow scheduling workloads on the master nodes.
|
838
|
-
*
|
839
|
-
* If no workers are specified, this option is ignored and the master nodes are used as workers.
|
840
|
-
*
|
841
|
-
* By default, this option is set to false.
|
842
|
-
*
|
843
|
-
* @schema
|
844
|
-
*/
|
845
|
-
scheduleOnMasters: {
|
846
|
-
...Type6.Default(Type6.Boolean(), false),
|
847
|
-
description: `Allow scheduling workloads on the master nodes.
|
848
|
-
|
849
|
-
If no workers are specified, this option is ignored and the master nodes are used as workers.
|
850
|
-
|
851
|
-
By default, this option is set to false.`
|
852
|
-
},
|
853
|
-
/**
|
854
|
-
* The endpoint of the cluster.
|
855
|
-
*
|
856
|
-
* By default, the first master node's endpoint is used.
|
857
|
-
*
|
858
|
-
* @schema
|
859
|
-
*/
|
860
|
-
endpoint: {
|
861
|
-
...Type6.Optional(Type6.String()),
|
862
|
-
description: `The endpoint of the cluster.
|
863
|
-
|
864
|
-
By default, the first master node's endpoint is used.`
|
865
|
-
},
|
1352
|
+
...scheduleOnMastersPolicyArgs,
|
866
1353
|
/**
|
867
1354
|
* The name of the cluster.
|
868
1355
|
*
|
@@ -871,7 +1358,7 @@ var cluster = defineUnit6({
|
|
871
1358
|
* @schema
|
872
1359
|
*/
|
873
1360
|
clusterName: {
|
874
|
-
...
|
1361
|
+
...Type8.Optional(Type8.String()),
|
875
1362
|
description: `The name of the cluster.
|
876
1363
|
|
877
1364
|
By default, the name of the instance is used.`
|
@@ -889,7 +1376,7 @@ var cluster = defineUnit6({
|
|
889
1376
|
* @schema
|
890
1377
|
*/
|
891
1378
|
cni: {
|
892
|
-
...
|
1379
|
+
...Type8.Default(cniSchema2, "cilium"),
|
893
1380
|
description: `The CNI plugin to use.
|
894
1381
|
|
895
1382
|
The following options are available:
|
@@ -909,7 +1396,7 @@ var cluster = defineUnit6({
|
|
909
1396
|
* @schema
|
910
1397
|
*/
|
911
1398
|
csi: {
|
912
|
-
...
|
1399
|
+
...Type8.Default(csiSchema, "local-path-provisioner"),
|
913
1400
|
description: `The CSI plugin to use.
|
914
1401
|
|
915
1402
|
The following options are available:
|
@@ -923,7 +1410,7 @@ var cluster = defineUnit6({
|
|
923
1410
|
* @schema
|
924
1411
|
*/
|
925
1412
|
sharedConfigPatch: {
|
926
|
-
...
|
1413
|
+
...Type8.Optional(Type8.Record(Type8.String(), Type8.Any())),
|
927
1414
|
description: `The shared configuration patch.
|
928
1415
|
It will be applied to all nodes.`
|
929
1416
|
},
|
@@ -934,7 +1421,7 @@ var cluster = defineUnit6({
|
|
934
1421
|
* @schema
|
935
1422
|
*/
|
936
1423
|
masterConfigPatch: {
|
937
|
-
...
|
1424
|
+
...Type8.Optional(Type8.Record(Type8.String(), Type8.Any())),
|
938
1425
|
description: `The master configuration patch.
|
939
1426
|
It will be applied to all master nodes.`
|
940
1427
|
},
|
@@ -945,7 +1432,7 @@ var cluster = defineUnit6({
|
|
945
1432
|
* @schema
|
946
1433
|
*/
|
947
1434
|
workerConfigPatch: {
|
948
|
-
...
|
1435
|
+
...Type8.Optional(Type8.Record(Type8.String(), Type8.Any())),
|
949
1436
|
description: `The worker configuration patch.
|
950
1437
|
It will be applied to all worker nodes.`
|
951
1438
|
},
|
@@ -956,27 +1443,11 @@ var cluster = defineUnit6({
|
|
956
1443
|
*
|
957
1444
|
* By default, this option is set to true.
|
958
1445
|
*/
|
959
|
-
enableTunDevicePlugin:
|
960
|
-
...sharedClusterArgs
|
961
|
-
},
|
962
|
-
inputs: {
|
963
|
-
masters: {
|
964
|
-
entity: serverEntity,
|
965
|
-
multiple: true
|
966
|
-
},
|
967
|
-
workers: {
|
968
|
-
entity: serverEntity,
|
969
|
-
multiple: true,
|
970
|
-
required: false
|
971
|
-
},
|
972
|
-
dnsProviders: {
|
973
|
-
entity: providerEntity,
|
974
|
-
required: false,
|
975
|
-
multiple: true
|
976
|
-
}
|
1446
|
+
enableTunDevicePlugin: Type8.Default(Type8.Boolean(), true)
|
977
1447
|
},
|
1448
|
+
inputs: clusterInputs,
|
978
1449
|
outputs: {
|
979
|
-
|
1450
|
+
...clusterOutputs,
|
980
1451
|
talosCluster: clusterEntity3
|
981
1452
|
},
|
982
1453
|
meta: {
|
@@ -1001,71 +1472,67 @@ __export(wireguard_exports, {
|
|
1001
1472
|
configBundle: () => configBundle,
|
1002
1473
|
identity: () => identity,
|
1003
1474
|
identityEntity: () => identityEntity,
|
1004
|
-
k8sNodeEntity: () => k8sNodeEntity,
|
1005
1475
|
network: () => network,
|
1006
1476
|
networkEntity: () => networkEntity,
|
1007
1477
|
node: () => node,
|
1478
|
+
nodeExposePolicySchema: () => nodeExposePolicySchema,
|
1008
1479
|
peer: () => peer,
|
1009
1480
|
peerEntity: () => peerEntity,
|
1010
|
-
|
1481
|
+
peerPatch: () => peerPatch
|
1011
1482
|
});
|
1012
|
-
import { defineEntity as
|
1013
|
-
|
1014
|
-
var
|
1015
|
-
var networkEntity =
|
1483
|
+
import { defineEntity as defineEntity8, defineUnit as defineUnit7, Type as Type9 } from "@highstate/contract";
|
1484
|
+
import { omit } from "remeda";
|
1485
|
+
var backendSchema = Type9.StringEnum(["wireguard", "amneziawg"]);
|
1486
|
+
var networkEntity = defineEntity8({
|
1016
1487
|
type: "wireguard.network",
|
1017
|
-
schema:
|
1018
|
-
backend:
|
1019
|
-
|
1020
|
-
globalPresharedKey: Type7.Optional(Type7.String()),
|
1021
|
-
ipv6: Type7.Optional(Type7.Boolean())
|
1488
|
+
schema: Type9.Object({
|
1489
|
+
backend: backendSchema,
|
1490
|
+
ipv6: Type9.Boolean()
|
1022
1491
|
})
|
1023
1492
|
});
|
1024
|
-
var
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1493
|
+
var nodeExposePolicySchema = Type9.StringEnum(["always", "when-has-endpoint", "never"]);
|
1494
|
+
var peerEntity = defineEntity8({
|
1495
|
+
type: "wireguard.peer",
|
1496
|
+
schema: Type9.Object({
|
1497
|
+
name: Type9.String(),
|
1498
|
+
network: Type9.Optional(networkEntity.schema),
|
1499
|
+
publicKey: Type9.String(),
|
1500
|
+
address: Type9.Optional(Type9.String()),
|
1501
|
+
allowedIps: Type9.Array(Type9.String()),
|
1502
|
+
endpoints: Type9.Array(l4EndpointEntity.schema),
|
1503
|
+
allowedEndpoints: Type9.Array(Type9.Union([l3EndpointEntity.schema, l4EndpointEntity.schema])),
|
1504
|
+
/**
|
1505
|
+
* The pre-shared key of the WireGuard peer.
|
1506
|
+
*
|
1507
|
+
* If one of two peers has `presharedKey` set, the other peer must have `presharedKey` set too and they must be equal.
|
1508
|
+
*
|
1509
|
+
* Will be ignored if both peers have `presharedKeyPart` set.
|
1510
|
+
*/
|
1511
|
+
presharedKey: Type9.Optional(Type9.String()),
|
1512
|
+
/**
|
1513
|
+
* The pre-shared key part of the WireGuard peer.
|
1514
|
+
*
|
1515
|
+
* If both peers have `presharedKeyPart` set, their `presharedKey` will be calculated as XOR of the two parts.
|
1516
|
+
*/
|
1517
|
+
presharedKeyPart: Type9.Optional(Type9.String()),
|
1518
|
+
excludedIps: Type9.Array(Type9.String()),
|
1519
|
+
dns: Type9.Array(Type9.String()),
|
1520
|
+
listenPort: Type9.Optional(Type9.Number())
|
1038
1521
|
}),
|
1039
1522
|
meta: {
|
1040
|
-
color: "#
|
1523
|
+
color: "#673AB7"
|
1041
1524
|
}
|
1042
1525
|
});
|
1043
|
-
var
|
1044
|
-
type: "wireguard.
|
1045
|
-
schema:
|
1046
|
-
|
1047
|
-
|
1048
|
-
publicKey: Type7.String(),
|
1049
|
-
address: Type7.Optional(Type7.String()),
|
1050
|
-
allowedIps: Type7.Array(Type7.String()),
|
1051
|
-
endpoint: Type7.Optional(Type7.String()),
|
1052
|
-
presharedKeyPart: Type7.Optional(Type7.String()),
|
1053
|
-
excludedIps: Type7.Optional(Type7.Array(Type7.String())),
|
1054
|
-
dns: Type7.Optional(Type7.Array(Type7.String()))
|
1526
|
+
var identityEntity = defineEntity8({
|
1527
|
+
type: "wireguard.identity",
|
1528
|
+
schema: Type9.Object({
|
1529
|
+
peer: peerEntity.schema,
|
1530
|
+
privateKey: Type9.String()
|
1055
1531
|
}),
|
1056
1532
|
meta: {
|
1057
|
-
color: "#
|
1533
|
+
color: "#F44336"
|
1058
1534
|
}
|
1059
1535
|
});
|
1060
|
-
var k8sNodeEntity = defineEntity7({
|
1061
|
-
type: "wireguard.node",
|
1062
|
-
schema: Type7.Object({
|
1063
|
-
network: Type7.String(),
|
1064
|
-
address: Type7.String(),
|
1065
|
-
endpoint: Type7.Optional(Type7.String()),
|
1066
|
-
peers: Type7.Array(Type7.String())
|
1067
|
-
})
|
1068
|
-
});
|
1069
1536
|
var network = defineUnit7({
|
1070
1537
|
type: "wireguard.network",
|
1071
1538
|
args: {
|
@@ -1081,7 +1548,7 @@ var network = defineUnit7({
|
|
1081
1548
|
* @schema
|
1082
1549
|
*/
|
1083
1550
|
backend: {
|
1084
|
-
...
|
1551
|
+
...Type9.Default(backendSchema, "wireguard"),
|
1085
1552
|
description: `The backend to use for the WireGuard network.
|
1086
1553
|
|
1087
1554
|
Possible values are:
|
@@ -1089,35 +1556,6 @@ var network = defineUnit7({
|
|
1089
1556
|
2. \`amneziawg\` - The censorship-resistant fork of WireGuard.
|
1090
1557
|
|
1091
1558
|
By default, the \`wireguard\` backend is used.`
|
1092
|
-
},
|
1093
|
-
/**
|
1094
|
-
* The option which defines how to handle pre-shared keys between peers.
|
1095
|
-
*
|
1096
|
-
* 1. `none` - No pre-shared keys will be used.
|
1097
|
-
* 2. `global` - A single pre-shared key will be used for all peer pairs in the network.
|
1098
|
-
* 3. `secure` - Each peer pair will have its own pre-shared key.
|
1099
|
-
* In this case, each identity generates `presharedKeyPart` and the actual pre-shared key
|
1100
|
-
* for each peer pair will be computed as `xor(peer1.presharedKeyPart, peer2.presharedKeyPart)`.
|
1101
|
-
*
|
1102
|
-
* If the whole network is managed by the HighState, the `secure` mode is recommended.
|
1103
|
-
*
|
1104
|
-
* By default, the `none` mode is used.
|
1105
|
-
*
|
1106
|
-
* @schema
|
1107
|
-
*/
|
1108
|
-
presharedKeyMode: {
|
1109
|
-
...Type7.Optional(presharedKeyModeSchema),
|
1110
|
-
description: `The option which defines how to handle pre-shared keys between peers.
|
1111
|
-
|
1112
|
-
1. \`none\` - No pre-shared keys will be used.
|
1113
|
-
2. \`global\` - A single pre-shared key will be used for all peer pairs in the network.
|
1114
|
-
3. \`secure\` - Each peer pair will have its own pre-shared key.
|
1115
|
-
In this case, each identity generates \`presharedKeyPart\` and the actual pre-shared key
|
1116
|
-
for each peer pair will be computed as \`xor(peer1.presharedKeyPart, peer2.presharedKeyPart)\`.
|
1117
|
-
|
1118
|
-
If the whole network is managed by the HighState, the \`secure\` mode is recommended.
|
1119
|
-
|
1120
|
-
By default, the \`none\` mode is used.`
|
1121
1559
|
},
|
1122
1560
|
/**
|
1123
1561
|
* The option to enable IPv6 support in the network.
|
@@ -1127,29 +1565,12 @@ var network = defineUnit7({
|
|
1127
1565
|
* @schema
|
1128
1566
|
*/
|
1129
1567
|
ipv6: {
|
1130
|
-
...
|
1568
|
+
...Type9.Default(Type9.Boolean(), false),
|
1131
1569
|
description: `The option to enable IPv6 support in the network.
|
1132
1570
|
|
1133
1571
|
By default, IPv6 support is disabled.`
|
1134
1572
|
}
|
1135
1573
|
},
|
1136
|
-
secrets: {
|
1137
|
-
/**
|
1138
|
-
* The global pre-shared key to use for all peer pairs in the network.
|
1139
|
-
*
|
1140
|
-
* Will be used only if `presharedKeyMode` is set to `global`.
|
1141
|
-
* Will be generated automatically if not provided.
|
1142
|
-
*
|
1143
|
-
* @schema
|
1144
|
-
*/
|
1145
|
-
globalPresharedKey: {
|
1146
|
-
...Type7.Optional(Type7.String()),
|
1147
|
-
description: `The global pre-shared key to use for all peer pairs in the network.
|
1148
|
-
|
1149
|
-
Will be used only if \`presharedKeyMode\` is set to \`global\`.
|
1150
|
-
Will be generated automatically if not provided.`
|
1151
|
-
}
|
1152
|
-
},
|
1153
1574
|
outputs: {
|
1154
1575
|
network: networkEntity
|
1155
1576
|
},
|
@@ -1157,7 +1578,8 @@ var network = defineUnit7({
|
|
1157
1578
|
description: "The WireGuard network with some shared configuration.",
|
1158
1579
|
primaryIcon: "simple-icons:wireguard",
|
1159
1580
|
primaryIconColor: "#88171a",
|
1160
|
-
secondaryIcon: "mdi:local-area-network-connect"
|
1581
|
+
secondaryIcon: "mdi:local-area-network-connect",
|
1582
|
+
category: "VPN"
|
1161
1583
|
},
|
1162
1584
|
source: {
|
1163
1585
|
package: "@highstate/wireguard",
|
@@ -1173,7 +1595,7 @@ var sharedPeerArgs = {
|
|
1173
1595
|
* @schema
|
1174
1596
|
*/
|
1175
1597
|
peerName: {
|
1176
|
-
...
|
1598
|
+
...Type9.Optional(Type9.String()),
|
1177
1599
|
description: `The name of the WireGuard peer.
|
1178
1600
|
|
1179
1601
|
If not provided, the peer will be named after the unit.`
|
@@ -1186,20 +1608,11 @@ var sharedPeerArgs = {
|
|
1186
1608
|
* @schema
|
1187
1609
|
*/
|
1188
1610
|
address: {
|
1189
|
-
...
|
1611
|
+
...Type9.Optional(Type9.String()),
|
1190
1612
|
description: `The address of the WireGuard interface.
|
1191
1613
|
|
1192
1614
|
The address may be any IPv4 or IPv6 address. CIDR notation is also supported.`
|
1193
1615
|
},
|
1194
|
-
/**
|
1195
|
-
* The list of allowed IPs for the peer.
|
1196
|
-
*
|
1197
|
-
* @schema
|
1198
|
-
*/
|
1199
|
-
allowedIps: {
|
1200
|
-
...Type7.Optional(Type7.Array(Type7.String())),
|
1201
|
-
description: `The list of allowed IPs for the peer.`
|
1202
|
-
},
|
1203
1616
|
/**
|
1204
1617
|
* The convenience option to set `allowedIps` to `0.0.0.0/0, ::/0`.
|
1205
1618
|
*
|
@@ -1208,7 +1621,7 @@ var sharedPeerArgs = {
|
|
1208
1621
|
* @schema
|
1209
1622
|
*/
|
1210
1623
|
exitNode: {
|
1211
|
-
...
|
1624
|
+
...Type9.Default(Type9.Boolean(), false),
|
1212
1625
|
description: `The convenience option to set \`allowedIps\` to \`0.0.0.0/0, ::/0\`.
|
1213
1626
|
|
1214
1627
|
Will be merged with the \`allowedIps\` if provided.`
|
@@ -1225,7 +1638,7 @@ var sharedPeerArgs = {
|
|
1225
1638
|
* @schema
|
1226
1639
|
*/
|
1227
1640
|
excludedIps: {
|
1228
|
-
...
|
1641
|
+
...Type9.Default(Type9.Array(Type9.String()), []),
|
1229
1642
|
description: `The list of IP ranges to exclude from the tunnel.
|
1230
1643
|
|
1231
1644
|
Implementation notes:
|
@@ -1253,7 +1666,7 @@ var sharedPeerArgs = {
|
|
1253
1666
|
* @schema
|
1254
1667
|
*/
|
1255
1668
|
excludePrivateIps: {
|
1256
|
-
...
|
1669
|
+
...Type9.Default(Type9.Boolean(), false),
|
1257
1670
|
description: `The convenience option to exclude private IPs from the tunnel.
|
1258
1671
|
|
1259
1672
|
For IPv4, the private IPs are:
|
@@ -1270,13 +1683,26 @@ var sharedPeerArgs = {
|
|
1270
1683
|
Will be merged with \`excludedIps\` if provided.`
|
1271
1684
|
},
|
1272
1685
|
/**
|
1273
|
-
* The
|
1686
|
+
* The endpoints of the WireGuard peer.
|
1687
|
+
*
|
1688
|
+
* @schema
|
1689
|
+
*/
|
1690
|
+
endpoints: {
|
1691
|
+
...Type9.Default(Type9.Array(Type9.String()), []),
|
1692
|
+
description: `The endpoints of the WireGuard peer.`
|
1693
|
+
},
|
1694
|
+
/**
|
1695
|
+
* The allowed endpoints of the WireGuard peer.
|
1696
|
+
*
|
1697
|
+
* The non `hostname` endpoints will be added to the `allowedIps` of the peer.
|
1274
1698
|
*
|
1275
1699
|
* @schema
|
1276
1700
|
*/
|
1277
|
-
|
1278
|
-
...
|
1279
|
-
description: `The
|
1701
|
+
allowedEndpoints: {
|
1702
|
+
...Type9.Default(Type9.Array(Type9.String()), []),
|
1703
|
+
description: `The allowed endpoints of the WireGuard peer.
|
1704
|
+
|
1705
|
+
The non \`hostname\` endpoints will be added to the \`allowedIps\` of the peer.`
|
1280
1706
|
},
|
1281
1707
|
/**
|
1282
1708
|
* The DNS servers that should be used by the interface connected to the WireGuard peer.
|
@@ -1286,7 +1712,7 @@ var sharedPeerArgs = {
|
|
1286
1712
|
* @schema
|
1287
1713
|
*/
|
1288
1714
|
dns: {
|
1289
|
-
...
|
1715
|
+
...Type9.Default(Type9.Array(Type9.String()), []),
|
1290
1716
|
description: `The DNS servers that should be used by the interface connected to the WireGuard peer.
|
1291
1717
|
|
1292
1718
|
If multiple peers define DNS servers, the node will merge them into a single list (but this is discouraged).`
|
@@ -1299,38 +1725,121 @@ var sharedPeerArgs = {
|
|
1299
1725
|
* @schema
|
1300
1726
|
*/
|
1301
1727
|
includeDns: {
|
1302
|
-
...
|
1728
|
+
...Type9.Default(Type9.Boolean(), true),
|
1303
1729
|
description: `The convenience option to include the DNS servers to the allowed IPs.
|
1304
1730
|
|
1305
1731
|
By default, is \`true\`.`
|
1732
|
+
},
|
1733
|
+
/**
|
1734
|
+
* The port to listen on.
|
1735
|
+
*
|
1736
|
+
* @schema
|
1737
|
+
*/
|
1738
|
+
listenPort: {
|
1739
|
+
...Type9.Optional(Type9.Number()),
|
1740
|
+
description: `The port to listen on.`
|
1306
1741
|
}
|
1307
1742
|
};
|
1308
|
-
var
|
1743
|
+
var sharedPeerInputs = {
|
1309
1744
|
/**
|
1310
|
-
* The
|
1745
|
+
* The network to use for the WireGuard identity.
|
1311
1746
|
*
|
1312
|
-
*
|
1747
|
+
* If not provided, the identity will use default network configuration.
|
1313
1748
|
*
|
1314
1749
|
* @schema
|
1315
1750
|
*/
|
1316
|
-
|
1317
|
-
...
|
1318
|
-
|
1751
|
+
network: {
|
1752
|
+
...{
|
1753
|
+
entity: networkEntity,
|
1754
|
+
required: false
|
1755
|
+
},
|
1756
|
+
description: `The network to use for the WireGuard identity.
|
1319
1757
|
|
1320
|
-
|
1758
|
+
If not provided, the identity will use default network configuration.`
|
1321
1759
|
},
|
1322
1760
|
/**
|
1323
|
-
* The
|
1761
|
+
* The L3 endpoints of the identity.
|
1324
1762
|
*
|
1325
|
-
* Will
|
1763
|
+
* Will produce L4 endpoints for each of the provided L3 endpoints.
|
1326
1764
|
*
|
1327
1765
|
* @schema
|
1328
1766
|
*/
|
1329
|
-
|
1330
|
-
...
|
1331
|
-
|
1767
|
+
l3Endpoints: {
|
1768
|
+
...{
|
1769
|
+
entity: l3EndpointEntity,
|
1770
|
+
multiple: true,
|
1771
|
+
required: false
|
1772
|
+
},
|
1773
|
+
description: `The L3 endpoints of the identity.
|
1774
|
+
|
1775
|
+
Will produce L4 endpoints for each of the provided L3 endpoints.`
|
1776
|
+
},
|
1777
|
+
/**
|
1778
|
+
* The L4 endpoints of the identity.
|
1779
|
+
*
|
1780
|
+
* Will take priority over all calculated endpoints if provided.
|
1781
|
+
*
|
1782
|
+
* @schema
|
1783
|
+
*/
|
1784
|
+
l4Endpoints: {
|
1785
|
+
...{
|
1786
|
+
entity: l4EndpointEntity,
|
1787
|
+
required: false,
|
1788
|
+
multiple: true
|
1789
|
+
},
|
1790
|
+
description: `The L4 endpoints of the identity.
|
1791
|
+
|
1792
|
+
Will take priority over all calculated endpoints if provided.`
|
1793
|
+
},
|
1794
|
+
/**
|
1795
|
+
* The L3 endpoints to add to the allowed IPs of the identity.
|
1796
|
+
*
|
1797
|
+
* `hostname` endpoints will be ignored.
|
1798
|
+
*
|
1799
|
+
* If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,
|
1800
|
+
* the corresponding network policy will be created.
|
1801
|
+
*
|
1802
|
+
* @schema
|
1803
|
+
*/
|
1804
|
+
allowedL3Endpoints: {
|
1805
|
+
...{
|
1806
|
+
entity: l3EndpointEntity,
|
1807
|
+
multiple: true,
|
1808
|
+
required: false
|
1809
|
+
},
|
1810
|
+
description: `The L3 endpoints to add to the allowed IPs of the identity.
|
1811
|
+
|
1812
|
+
\`hostname\` endpoints will be ignored.
|
1813
|
+
|
1814
|
+
If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,
|
1815
|
+
the corresponding network policy will be created.`
|
1816
|
+
},
|
1817
|
+
/**
|
1818
|
+
* The L4 endpoints to add to the allowed IPs of the identity.
|
1819
|
+
*
|
1820
|
+
* If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,
|
1821
|
+
* the corresponding network policy will be created.
|
1822
|
+
*
|
1823
|
+
* @schema
|
1824
|
+
*/
|
1825
|
+
allowedL4Endpoints: {
|
1826
|
+
...{
|
1827
|
+
entity: l4EndpointEntity,
|
1828
|
+
multiple: true,
|
1829
|
+
required: false
|
1830
|
+
},
|
1831
|
+
description: `The L4 endpoints to add to the allowed IPs of the identity.
|
1332
1832
|
|
1333
|
-
|
1833
|
+
If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,
|
1834
|
+
the corresponding network policy will be created.`
|
1835
|
+
}
|
1836
|
+
};
|
1837
|
+
var sharedPeerOutputs = {
|
1838
|
+
peer: peerEntity,
|
1839
|
+
endpoints: {
|
1840
|
+
entity: l4EndpointEntity,
|
1841
|
+
required: false,
|
1842
|
+
multiple: true
|
1334
1843
|
}
|
1335
1844
|
};
|
1336
1845
|
var peer = defineUnit7({
|
@@ -1343,68 +1852,99 @@ var peer = defineUnit7({
|
|
1343
1852
|
* @schema
|
1344
1853
|
*/
|
1345
1854
|
publicKey: {
|
1346
|
-
...
|
1855
|
+
...Type9.String(),
|
1347
1856
|
description: `The public key of the WireGuard peer.`
|
1348
1857
|
}
|
1349
1858
|
},
|
1350
|
-
|
1859
|
+
secrets: {
|
1351
1860
|
/**
|
1352
|
-
* The
|
1353
|
-
*
|
1354
|
-
* If not provided, the peer will use default network configuration.
|
1861
|
+
* The pre-shared key which should be used for the peer.
|
1355
1862
|
*
|
1356
1863
|
* @schema
|
1357
1864
|
*/
|
1358
|
-
|
1359
|
-
...
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1865
|
+
presharedKey: {
|
1866
|
+
...Type9.Optional(Type9.String()),
|
1867
|
+
description: `The pre-shared key which should be used for the peer.`
|
1868
|
+
}
|
1869
|
+
},
|
1870
|
+
inputs: sharedPeerInputs,
|
1871
|
+
outputs: sharedPeerOutputs,
|
1872
|
+
meta: {
|
1873
|
+
description: "The WireGuard peer with the public key.",
|
1874
|
+
primaryIcon: "simple-icons:wireguard",
|
1875
|
+
primaryIconColor: "#88171a",
|
1876
|
+
secondaryIcon: "mdi:badge-account-horizontal",
|
1877
|
+
category: "VPN"
|
1878
|
+
},
|
1879
|
+
source: {
|
1880
|
+
package: "@highstate/wireguard",
|
1881
|
+
path: "peer"
|
1882
|
+
}
|
1883
|
+
});
|
1884
|
+
var peerPatch = defineUnit7({
|
1885
|
+
type: "wireguard.peer-patch",
|
1886
|
+
args: {
|
1367
1887
|
/**
|
1368
|
-
* The
|
1888
|
+
* The endpoints of the WireGuard peer.
|
1369
1889
|
*
|
1370
1890
|
* @schema
|
1371
1891
|
*/
|
1372
|
-
|
1373
|
-
...
|
1374
|
-
|
1375
|
-
required: false
|
1376
|
-
},
|
1377
|
-
description: `The existing WireGuard peer to extend.`
|
1892
|
+
endpoints: {
|
1893
|
+
...Type9.Default(Type9.Array(Type9.String()), []),
|
1894
|
+
description: `The endpoints of the WireGuard peer.`
|
1378
1895
|
},
|
1379
1896
|
/**
|
1380
|
-
* The
|
1897
|
+
* The mode to use for patching the endpoints.
|
1898
|
+
*
|
1899
|
+
* - `prepend`: prepend the new endpoints to the existing ones (default);
|
1900
|
+
* - `replace`: replace the existing endpoints with the new ones.
|
1901
|
+
*/
|
1902
|
+
endpointsPatchMode: Type9.Default(arrayPatchModeSchema, "prepend"),
|
1903
|
+
/**
|
1904
|
+
* The allowed endpoints of the WireGuard peer.
|
1381
1905
|
*
|
1382
|
-
*
|
1906
|
+
* The non `hostname` endpoints will be added to the `allowedIps` of the peer.
|
1383
1907
|
*
|
1384
1908
|
* @schema
|
1385
1909
|
*/
|
1386
|
-
|
1387
|
-
...
|
1388
|
-
|
1389
|
-
required: false
|
1390
|
-
},
|
1391
|
-
description: `The L4 endpoint of the peer.
|
1910
|
+
allowedEndpoints: {
|
1911
|
+
...Type9.Default(Type9.Array(Type9.String()), []),
|
1912
|
+
description: `The allowed endpoints of the WireGuard peer.
|
1392
1913
|
|
1393
|
-
|
1394
|
-
}
|
1914
|
+
The non \`hostname\` endpoints will be added to the \`allowedIps\` of the peer.`
|
1915
|
+
},
|
1916
|
+
/**
|
1917
|
+
* The mode to use for patching the allowed endpoints.
|
1918
|
+
*
|
1919
|
+
* - `prepend`: prepend the new endpoints to the existing ones (default);
|
1920
|
+
* - `replace`: replace the existing endpoints with the new ones.
|
1921
|
+
*/
|
1922
|
+
allowedEndpointsPatchMode: Type9.Default(arrayPatchModeSchema, "prepend"),
|
1923
|
+
...omit(sharedPeerArgs, ["endpoints", "allowedEndpoints"])
|
1924
|
+
},
|
1925
|
+
inputs: {
|
1926
|
+
peer: peerEntity,
|
1927
|
+
...sharedPeerInputs
|
1395
1928
|
},
|
1396
1929
|
outputs: {
|
1397
|
-
peer: peerEntity
|
1930
|
+
peer: peerEntity,
|
1931
|
+
endpoints: {
|
1932
|
+
entity: l4EndpointEntity,
|
1933
|
+
required: false,
|
1934
|
+
multiple: true
|
1935
|
+
}
|
1398
1936
|
},
|
1399
1937
|
meta: {
|
1400
|
-
|
1938
|
+
displayName: "WireGuard Peer Patch",
|
1939
|
+
description: "Patches some properties of the WireGuard peer.",
|
1401
1940
|
primaryIcon: "simple-icons:wireguard",
|
1402
1941
|
primaryIconColor: "#88171a",
|
1403
|
-
secondaryIcon: "mdi:badge-account-horizontal"
|
1942
|
+
secondaryIcon: "mdi:badge-account-horizontal",
|
1943
|
+
category: "VPN"
|
1404
1944
|
},
|
1405
1945
|
source: {
|
1406
1946
|
package: "@highstate/wireguard",
|
1407
|
-
path: "peer"
|
1947
|
+
path: "peer-patch"
|
1408
1948
|
}
|
1409
1949
|
});
|
1410
1950
|
var identity = defineUnit7({
|
@@ -1419,74 +1959,27 @@ var identity = defineUnit7({
|
|
1419
1959
|
* @schema
|
1420
1960
|
*/
|
1421
1961
|
listenPort: {
|
1422
|
-
...
|
1423
|
-
description: `The port to listen on.
|
1424
|
-
|
1425
|
-
Used by the implementation of the identity and to calculate the endpoint of the peer.`
|
1426
|
-
},
|
1427
|
-
/**
|
1428
|
-
* The external IP address of the WireGuard identity.
|
1429
|
-
*
|
1430
|
-
* Used by the implementation of the identity and to calculate the endpoint of the peer.
|
1431
|
-
*
|
1432
|
-
* @schema
|
1433
|
-
*/
|
1434
|
-
externalIp: {
|
1435
|
-
...Type7.Optional(Type7.String()),
|
1436
|
-
description: `The external IP address of the WireGuard identity.
|
1962
|
+
...Type9.Optional(Type9.Number()),
|
1963
|
+
description: `The port to listen on.
|
1437
1964
|
|
1438
1965
|
Used by the implementation of the identity and to calculate the endpoint of the peer.`
|
1439
1966
|
},
|
1440
1967
|
/**
|
1441
1968
|
* The endpoint of the WireGuard peer.
|
1442
1969
|
*
|
1443
|
-
* By default, the endpoint is calculated as `externalIp:listenPort`.
|
1444
|
-
*
|
1445
1970
|
* If overridden, does not affect node which implements the identity, but is used in the peer configuration of other nodes.
|
1446
1971
|
*
|
1447
1972
|
* Will take priority over all calculated endpoints and `l4Endpoint` input.
|
1448
1973
|
*
|
1449
1974
|
* @schema
|
1450
1975
|
*/
|
1451
|
-
|
1452
|
-
...
|
1976
|
+
endpoints: {
|
1977
|
+
...Type9.Default(Type9.Array(Type9.String()), []),
|
1453
1978
|
description: `The endpoint of the WireGuard peer.
|
1454
1979
|
|
1455
|
-
By default, the endpoint is calculated as \`externalIp:listenPort\`.
|
1456
|
-
|
1457
1980
|
If overridden, does not affect node which implements the identity, but is used in the peer configuration of other nodes.
|
1458
1981
|
|
1459
1982
|
Will take priority over all calculated endpoints and \`l4Endpoint\` input.`
|
1460
|
-
},
|
1461
|
-
/**
|
1462
|
-
* The FQDN of the WireGuard identity.
|
1463
|
-
* Will be used as endpoint for the peer.
|
1464
|
-
*
|
1465
|
-
* If `dnsProvider` is provided, external IP is available and `registerFqdn` is set to `true`, and FQDN is provided explicitly (not obtained from the k8s cluster),
|
1466
|
-
* the FQDN will be registered with the DNS provider.
|
1467
|
-
*
|
1468
|
-
* @schema
|
1469
|
-
*/
|
1470
|
-
fqdn: {
|
1471
|
-
...Type7.Optional(Type7.String()),
|
1472
|
-
description: `The FQDN of the WireGuard identity.
|
1473
|
-
Will be used as endpoint for the peer.
|
1474
|
-
|
1475
|
-
If \`dnsProvider\` is provided, external IP is available and \`registerFqdn\` is set to \`true\`, and FQDN is provided explicitly (not obtained from the k8s cluster),
|
1476
|
-
the FQDN will be registered with the DNS provider.`
|
1477
|
-
},
|
1478
|
-
/**
|
1479
|
-
* Whether to register the FQDN of the identity with the matching DNS providers.
|
1480
|
-
*
|
1481
|
-
* By default, `true`.
|
1482
|
-
*
|
1483
|
-
* @schema
|
1484
|
-
*/
|
1485
|
-
registerFqdn: {
|
1486
|
-
...Type7.Default(Type7.Boolean(), true),
|
1487
|
-
description: `Whether to register the FQDN of the identity with the matching DNS providers.
|
1488
|
-
|
1489
|
-
By default, \`true\`.`
|
1490
1983
|
}
|
1491
1984
|
},
|
1492
1985
|
secrets: {
|
@@ -1498,7 +1991,7 @@ var identity = defineUnit7({
|
|
1498
1991
|
* @schema
|
1499
1992
|
*/
|
1500
1993
|
privateKey: {
|
1501
|
-
...
|
1994
|
+
...Type9.Optional(Type9.String()),
|
1502
1995
|
description: `The private key of the WireGuard identity.
|
1503
1996
|
|
1504
1997
|
If not provided, the key will be generated automatically.`
|
@@ -1511,105 +2004,23 @@ var identity = defineUnit7({
|
|
1511
2004
|
* @schema
|
1512
2005
|
*/
|
1513
2006
|
presharedKeyPart: {
|
1514
|
-
...
|
2007
|
+
...Type9.Optional(Type9.String()),
|
1515
2008
|
description: `The part of the pre-shared of the WireGuard identity.
|
1516
2009
|
|
1517
2010
|
Will be generated automatically if not provided.`
|
1518
2011
|
}
|
1519
2012
|
},
|
1520
|
-
inputs:
|
1521
|
-
/**
|
1522
|
-
* The network to use for the WireGuard identity.
|
1523
|
-
*
|
1524
|
-
* If not provided, the identity will use default network configuration.
|
1525
|
-
*
|
1526
|
-
* @schema
|
1527
|
-
*/
|
1528
|
-
network: {
|
1529
|
-
...{
|
1530
|
-
entity: networkEntity,
|
1531
|
-
required: false
|
1532
|
-
},
|
1533
|
-
description: `The network to use for the WireGuard identity.
|
1534
|
-
|
1535
|
-
If not provided, the identity will use default network configuration.`
|
1536
|
-
},
|
1537
|
-
/**
|
1538
|
-
* The list of Kubernetes services to expose the WireGuard identity.
|
1539
|
-
*
|
1540
|
-
* Their IP addresses will be added to the `allowedIps` of the identity and passed to the node to set up network policies.
|
1541
|
-
*
|
1542
|
-
* @schema
|
1543
|
-
*/
|
1544
|
-
k8sServices: {
|
1545
|
-
...{
|
1546
|
-
entity: serviceEntity,
|
1547
|
-
multiple: true,
|
1548
|
-
required: false
|
1549
|
-
},
|
1550
|
-
description: `The list of Kubernetes services to expose the WireGuard identity.
|
1551
|
-
|
1552
|
-
Their IP addresses will be added to the \`allowedIps\` of the identity and passed to the node to set up network policies.`
|
1553
|
-
},
|
1554
|
-
/**
|
1555
|
-
* The Kubernetes cluster associated with the identity.
|
1556
|
-
*
|
1557
|
-
* If provided, will be used to obtain the external IP or FQDN of the identity.
|
1558
|
-
*
|
1559
|
-
* @schema
|
1560
|
-
*/
|
1561
|
-
k8sCluster: {
|
1562
|
-
...{
|
1563
|
-
entity: clusterEntity2,
|
1564
|
-
required: false
|
1565
|
-
},
|
1566
|
-
description: `The Kubernetes cluster associated with the identity.
|
1567
|
-
|
1568
|
-
If provided, will be used to obtain the external IP or FQDN of the identity.`
|
1569
|
-
},
|
1570
|
-
/**
|
1571
|
-
* The L4 endpoint of the identity.
|
1572
|
-
*
|
1573
|
-
* Will take priority over all calculated endpoints if provided.
|
1574
|
-
*
|
1575
|
-
* @schema
|
1576
|
-
*/
|
1577
|
-
l4Endpoint: {
|
1578
|
-
...{
|
1579
|
-
entity: l4EndpointEntity,
|
1580
|
-
required: false
|
1581
|
-
},
|
1582
|
-
description: `The L4 endpoint of the identity.
|
1583
|
-
|
1584
|
-
Will take priority over all calculated endpoints if provided.`
|
1585
|
-
},
|
1586
|
-
/**
|
1587
|
-
* The DNS providers to register the FQDN of the identity with.
|
1588
|
-
*
|
1589
|
-
* @schema
|
1590
|
-
*/
|
1591
|
-
dnsProviders: {
|
1592
|
-
...{
|
1593
|
-
entity: providerEntity,
|
1594
|
-
required: false,
|
1595
|
-
multiple: true
|
1596
|
-
},
|
1597
|
-
description: `The DNS providers to register the FQDN of the identity with.`
|
1598
|
-
}
|
1599
|
-
},
|
2013
|
+
inputs: sharedPeerInputs,
|
1600
2014
|
outputs: {
|
1601
2015
|
identity: identityEntity,
|
1602
|
-
|
1603
|
-
l4Endpoint: {
|
1604
|
-
entity: l4EndpointEntity,
|
1605
|
-
required: false
|
1606
|
-
}
|
2016
|
+
...sharedPeerOutputs
|
1607
2017
|
},
|
1608
2018
|
meta: {
|
1609
2019
|
description: "The WireGuard identity with the public key.",
|
1610
2020
|
primaryIcon: "simple-icons:wireguard",
|
1611
2021
|
primaryIconColor: "#88171a",
|
1612
|
-
secondaryIcon: "mdi:account"
|
2022
|
+
secondaryIcon: "mdi:account",
|
2023
|
+
category: "VPN"
|
1613
2024
|
},
|
1614
2025
|
source: {
|
1615
2026
|
package: "@highstate/wireguard",
|
@@ -1619,22 +2030,38 @@ var identity = defineUnit7({
|
|
1619
2030
|
var node = defineUnit7({
|
1620
2031
|
type: "wireguard.node",
|
1621
2032
|
args: {
|
1622
|
-
appName: Type7.Optional(Type7.String()),
|
1623
|
-
serviceType: Type7.Optional(serviceTypeSchema),
|
1624
|
-
...sharedInterfaceArgs,
|
1625
2033
|
/**
|
1626
|
-
* The
|
2034
|
+
* The name of the namespace/deployment/statefulset where the WireGuard node will be deployed.
|
1627
2035
|
*
|
1628
|
-
*
|
2036
|
+
* By default, the name is `wg-${identity.name}`.
|
1629
2037
|
*
|
1630
2038
|
* @schema
|
1631
2039
|
*/
|
1632
|
-
|
1633
|
-
...
|
1634
|
-
description: `The
|
2040
|
+
appName: {
|
2041
|
+
...Type9.Optional(Type9.String()),
|
2042
|
+
description: `The name of the namespace/deployment/statefulset where the WireGuard node will be deployed.
|
1635
2043
|
|
1636
|
-
|
2044
|
+
By default, the name is \`wg-\${identity.name}\`.`
|
1637
2045
|
},
|
2046
|
+
/**
|
2047
|
+
* Whether to expose the WireGuard node to the outside world.
|
2048
|
+
*
|
2049
|
+
* @schema
|
2050
|
+
*/
|
2051
|
+
external: {
|
2052
|
+
...Type9.Default(Type9.Boolean(), false),
|
2053
|
+
description: `Whether to expose the WireGuard node to the outside world.`
|
2054
|
+
},
|
2055
|
+
/**
|
2056
|
+
* The policy to use for exposing the WireGuard node.
|
2057
|
+
*
|
2058
|
+
* - `always` - The node will be exposed and the service will be created.
|
2059
|
+
* - `when-has-endpoint` - The node will be exposed only if the provided idenity has at least one endpoint.
|
2060
|
+
* - `never` - The node will not be exposed and the service will not be created.
|
2061
|
+
*
|
2062
|
+
* * By default, the `when-has-endpoint` policy is used.
|
2063
|
+
*/
|
2064
|
+
exposePolicy: Type9.Default(nodeExposePolicySchema, "when-has-endpoint"),
|
1638
2065
|
/**
|
1639
2066
|
* The extra specification of the container which runs the WireGuard node.
|
1640
2067
|
*
|
@@ -1643,7 +2070,7 @@ var node = defineUnit7({
|
|
1643
2070
|
* @schema
|
1644
2071
|
*/
|
1645
2072
|
containerSpec: {
|
1646
|
-
...
|
2073
|
+
...Type9.Optional(Type9.Record(Type9.String(), Type9.Any())),
|
1647
2074
|
description: `The extra specification of the container which runs the WireGuard node.
|
1648
2075
|
|
1649
2076
|
Will override any overlapping fields.`
|
@@ -1652,12 +2079,8 @@ var node = defineUnit7({
|
|
1652
2079
|
inputs: {
|
1653
2080
|
identity: identityEntity,
|
1654
2081
|
k8sCluster: clusterEntity2,
|
1655
|
-
|
1656
|
-
entity:
|
1657
|
-
required: false
|
1658
|
-
},
|
1659
|
-
statefulSet: {
|
1660
|
-
entity: statefulSetEntity,
|
2082
|
+
workload: {
|
2083
|
+
entity: exposableWorkloadEntity,
|
1661
2084
|
required: false
|
1662
2085
|
},
|
1663
2086
|
interface: {
|
@@ -1671,24 +2094,26 @@ var node = defineUnit7({
|
|
1671
2094
|
}
|
1672
2095
|
},
|
1673
2096
|
outputs: {
|
1674
|
-
deployment: {
|
1675
|
-
entity: deploymentEntity,
|
1676
|
-
required: false
|
1677
|
-
},
|
1678
2097
|
interface: {
|
1679
2098
|
entity: interfaceEntity,
|
1680
2099
|
required: false
|
1681
2100
|
},
|
1682
|
-
|
1683
|
-
entity:
|
2101
|
+
peer: {
|
2102
|
+
entity: peerEntity,
|
1684
2103
|
required: false
|
2104
|
+
},
|
2105
|
+
endpoints: {
|
2106
|
+
entity: l4EndpointEntity,
|
2107
|
+
required: false,
|
2108
|
+
multiple: true
|
1685
2109
|
}
|
1686
2110
|
},
|
1687
2111
|
meta: {
|
1688
2112
|
description: "The WireGuard node running on the Kubernetes.",
|
1689
2113
|
primaryIcon: "simple-icons:wireguard",
|
1690
2114
|
primaryIconColor: "#88171a",
|
1691
|
-
secondaryIcon: "mdi:server"
|
2115
|
+
secondaryIcon: "mdi:server",
|
2116
|
+
category: "VPN"
|
1692
2117
|
},
|
1693
2118
|
source: {
|
1694
2119
|
package: "@highstate/wireguard",
|
@@ -1698,7 +2123,6 @@ var node = defineUnit7({
|
|
1698
2123
|
var config = defineUnit7({
|
1699
2124
|
type: "wireguard.config",
|
1700
2125
|
args: {
|
1701
|
-
...sharedInterfaceArgs,
|
1702
2126
|
/**
|
1703
2127
|
* The name of the "default" interface where non-tunneled traffic should go.
|
1704
2128
|
*
|
@@ -1707,7 +2131,7 @@ var config = defineUnit7({
|
|
1707
2131
|
* @schema
|
1708
2132
|
*/
|
1709
2133
|
defaultInterface: {
|
1710
|
-
...
|
2134
|
+
...Type9.Optional(Type9.String()),
|
1711
2135
|
description: `The name of the "default" interface where non-tunneled traffic should go.
|
1712
2136
|
|
1713
2137
|
If not provided, the config will not respect \`excludedIps\`.`
|
@@ -1726,7 +2150,8 @@ var config = defineUnit7({
|
|
1726
2150
|
description: "Just the WireGuard configuration for the identity and peers.",
|
1727
2151
|
primaryIcon: "simple-icons:wireguard",
|
1728
2152
|
primaryIconColor: "#88171a",
|
1729
|
-
secondaryIcon: "mdi:settings"
|
2153
|
+
secondaryIcon: "mdi:settings",
|
2154
|
+
category: "VPN"
|
1730
2155
|
},
|
1731
2156
|
source: {
|
1732
2157
|
package: "@highstate/wireguard",
|
@@ -1752,7 +2177,8 @@ var configBundle = defineUnit7({
|
|
1752
2177
|
description: "The WireGuard configuration bundle for the identity and peers.",
|
1753
2178
|
primaryIcon: "simple-icons:wireguard",
|
1754
2179
|
primaryIconColor: "#88171a",
|
1755
|
-
secondaryIcon: "mdi:folder-settings-variant"
|
2180
|
+
secondaryIcon: "mdi:folder-settings-variant",
|
2181
|
+
category: "VPN"
|
1756
2182
|
},
|
1757
2183
|
source: {
|
1758
2184
|
package: "@highstate/wireguard",
|
@@ -1765,7 +2191,11 @@ var apps_exports = {};
|
|
1765
2191
|
__export(apps_exports, {
|
1766
2192
|
backupModeSchema: () => backupModeSchema,
|
1767
2193
|
codeServer: () => codeServer,
|
2194
|
+
createArgs: () => createArgs2,
|
2195
|
+
createInputs: () => createInputs,
|
1768
2196
|
deployment: () => deployment,
|
2197
|
+
endpointFilter: () => endpointFilter,
|
2198
|
+
explicitEndpointFilterSchema: () => explicitEndpointFilterSchema,
|
1769
2199
|
grocy: () => grocy,
|
1770
2200
|
kubernetesDashboard: () => kubernetesDashboard,
|
1771
2201
|
mariadb: () => mariadb,
|
@@ -1778,13 +2208,18 @@ __export(apps_exports, {
|
|
1778
2208
|
postgresql: () => postgresql,
|
1779
2209
|
postgresqlDatabase: () => postgresqlDatabase,
|
1780
2210
|
postgresqlEntity: () => postgresqlEntity,
|
2211
|
+
recordSet: () => recordSet,
|
2212
|
+
sharedArgs: () => sharedArgs,
|
1781
2213
|
syncthing: () => syncthing,
|
1782
2214
|
traefikGateway: () => traefikGateway,
|
1783
2215
|
vaultwarden: () => vaultwarden
|
1784
2216
|
});
|
1785
2217
|
|
1786
2218
|
// src/apps/mariadb.ts
|
1787
|
-
import { defineEntity as
|
2219
|
+
import { defineEntity as defineEntity10, defineUnit as defineUnit9, Type as Type12 } from "@highstate/contract";
|
2220
|
+
|
2221
|
+
// src/apps/shared.ts
|
2222
|
+
import { Type as Type11 } from "@highstate/contract";
|
1788
2223
|
|
1789
2224
|
// src/restic.ts
|
1790
2225
|
var restic_exports = {};
|
@@ -1792,16 +2227,16 @@ __export(restic_exports, {
|
|
1792
2227
|
repo: () => repo,
|
1793
2228
|
repoEntity: () => repoEntity
|
1794
2229
|
});
|
1795
|
-
import { defineEntity as
|
1796
|
-
var repoEntity =
|
2230
|
+
import { defineEntity as defineEntity9, defineUnit as defineUnit8, Type as Type10 } from "@highstate/contract";
|
2231
|
+
var repoEntity = defineEntity9({
|
1797
2232
|
type: "restic.repo",
|
1798
|
-
schema:
|
1799
|
-
password:
|
1800
|
-
|
1801
|
-
type:
|
1802
|
-
rcloneConfig:
|
1803
|
-
remoteName:
|
1804
|
-
basePath:
|
2233
|
+
schema: Type10.Object({
|
2234
|
+
password: Type10.String(),
|
2235
|
+
remoteEndpoints: Type10.Array(Type10.String()),
|
2236
|
+
type: Type10.Literal("rclone"),
|
2237
|
+
rcloneConfig: Type10.String(),
|
2238
|
+
remoteName: Type10.String(),
|
2239
|
+
basePath: Type10.String()
|
1805
2240
|
}),
|
1806
2241
|
meta: {
|
1807
2242
|
color: "#e56901"
|
@@ -1810,12 +2245,12 @@ var repoEntity = defineEntity8({
|
|
1810
2245
|
var repo = defineUnit8({
|
1811
2246
|
type: "restic.repo",
|
1812
2247
|
args: {
|
1813
|
-
remoteDomains:
|
1814
|
-
basePath:
|
2248
|
+
remoteDomains: Type10.Optional(Type10.Array(Type10.String())),
|
2249
|
+
basePath: Type10.Optional(Type10.String())
|
1815
2250
|
},
|
1816
2251
|
secrets: {
|
1817
|
-
password:
|
1818
|
-
rcloneConfig:
|
2252
|
+
password: Type10.Optional(Type10.String()),
|
2253
|
+
rcloneConfig: Type10.String({ multiline: true })
|
1819
2254
|
},
|
1820
2255
|
outputs: {
|
1821
2256
|
repo: repoEntity
|
@@ -1824,7 +2259,8 @@ var repo = defineUnit8({
|
|
1824
2259
|
displayName: "Restic Repo",
|
1825
2260
|
description: "Holds the configuration for a Restic repository and its remote storage.",
|
1826
2261
|
primaryIconColor: "#e56901",
|
1827
|
-
primaryIcon: "material-symbols:backup"
|
2262
|
+
primaryIcon: "material-symbols:backup",
|
2263
|
+
category: "Infrastructure"
|
1828
2264
|
},
|
1829
2265
|
source: {
|
1830
2266
|
package: "@highstate/restic",
|
@@ -1832,39 +2268,126 @@ var repo = defineUnit8({
|
|
1832
2268
|
}
|
1833
2269
|
});
|
1834
2270
|
|
2271
|
+
// src/apps/shared.ts
|
2272
|
+
var extraArgsDefinitions = {
|
2273
|
+
fqdn: {
|
2274
|
+
schema: Type11.String()
|
2275
|
+
},
|
2276
|
+
endpoints: {
|
2277
|
+
schema: Type11.Array(Type11.String()),
|
2278
|
+
required: false
|
2279
|
+
},
|
2280
|
+
external: {
|
2281
|
+
schema: Type11.Boolean(),
|
2282
|
+
required: false
|
2283
|
+
}
|
2284
|
+
};
|
2285
|
+
var eagerExtraInputDefinitions = {
|
2286
|
+
accessPoint: {
|
2287
|
+
entity: accessPointEntity
|
2288
|
+
},
|
2289
|
+
resticRepo: {
|
2290
|
+
entity: repoEntity,
|
2291
|
+
required: false
|
2292
|
+
},
|
2293
|
+
dnsProviders: {
|
2294
|
+
entity: providerEntity,
|
2295
|
+
required: false,
|
2296
|
+
multiple: true
|
2297
|
+
},
|
2298
|
+
volume: {
|
2299
|
+
entity: persistentVolumeClaimEntity,
|
2300
|
+
required: false
|
2301
|
+
}
|
2302
|
+
};
|
2303
|
+
var extraInputDefinitions = {
|
2304
|
+
...eagerExtraInputDefinitions
|
2305
|
+
};
|
2306
|
+
function createArgs2(defaultAppName, extraArgs) {
|
2307
|
+
const base = {
|
2308
|
+
appName: Type11.Default(Type11.String(), defaultAppName)
|
2309
|
+
};
|
2310
|
+
const dynamicArgs = {};
|
2311
|
+
if (Array.isArray(extraArgs)) {
|
2312
|
+
for (const name of extraArgs) {
|
2313
|
+
dynamicArgs[name] = extraArgsDefinitions[name];
|
2314
|
+
}
|
2315
|
+
} else {
|
2316
|
+
const { required, optional } = extraArgs ?? {};
|
2317
|
+
for (const name of required ?? []) {
|
2318
|
+
dynamicArgs[name] = {
|
2319
|
+
...extraArgsDefinitions[name],
|
2320
|
+
required: true
|
2321
|
+
};
|
2322
|
+
}
|
2323
|
+
for (const name of optional ?? []) {
|
2324
|
+
dynamicArgs[name] = {
|
2325
|
+
...extraArgsDefinitions[name],
|
2326
|
+
required: false
|
2327
|
+
};
|
2328
|
+
}
|
2329
|
+
}
|
2330
|
+
return {
|
2331
|
+
...base,
|
2332
|
+
...dynamicArgs
|
2333
|
+
};
|
2334
|
+
}
|
2335
|
+
function createInputs(inputs2) {
|
2336
|
+
const base = {
|
2337
|
+
k8sCluster: clusterEntity2
|
2338
|
+
};
|
2339
|
+
const dynamicInputs = {};
|
2340
|
+
if (Array.isArray(inputs2)) {
|
2341
|
+
for (const name of inputs2) {
|
2342
|
+
dynamicInputs[name] = extraInputDefinitions[name];
|
2343
|
+
}
|
2344
|
+
} else {
|
2345
|
+
const { required, optional } = inputs2 ?? {};
|
2346
|
+
for (const name of required ?? []) {
|
2347
|
+
dynamicInputs[name] = {
|
2348
|
+
...extraInputDefinitions[name],
|
2349
|
+
required: true
|
2350
|
+
};
|
2351
|
+
}
|
2352
|
+
for (const name of optional ?? []) {
|
2353
|
+
dynamicInputs[name] = {
|
2354
|
+
...extraInputDefinitions[name],
|
2355
|
+
required: false
|
2356
|
+
};
|
2357
|
+
}
|
2358
|
+
}
|
2359
|
+
return {
|
2360
|
+
...base,
|
2361
|
+
...dynamicInputs
|
2362
|
+
};
|
2363
|
+
}
|
2364
|
+
function createSource(path) {
|
2365
|
+
return {
|
2366
|
+
package: "@highstate/apps",
|
2367
|
+
path
|
2368
|
+
};
|
2369
|
+
}
|
2370
|
+
var databaseSchema = Type11.Object({
|
2371
|
+
endpoints: Type11.Array(l4EndpointEntity.schema),
|
2372
|
+
service: Type11.Optional(serviceEntity.schema),
|
2373
|
+
rootPassword: Type11.String()
|
2374
|
+
});
|
2375
|
+
|
1835
2376
|
// src/apps/mariadb.ts
|
1836
|
-
var mariadbEntity =
|
2377
|
+
var mariadbEntity = defineEntity10({
|
1837
2378
|
type: "apps.mariadb",
|
1838
|
-
schema:
|
1839
|
-
service: Type9.Optional(serviceEntity.schema),
|
1840
|
-
host: Type9.String(),
|
1841
|
-
port: Type9.Number(),
|
1842
|
-
rootPassword: Type9.String()
|
1843
|
-
}),
|
2379
|
+
schema: databaseSchema,
|
1844
2380
|
meta: {
|
1845
2381
|
color: "#f06292"
|
1846
2382
|
}
|
1847
2383
|
});
|
1848
2384
|
var mariadb = defineUnit9({
|
1849
2385
|
type: "apps.mariadb",
|
1850
|
-
args:
|
1851
|
-
fqdn: Type9.Optional(Type9.String()),
|
1852
|
-
appName: Type9.Optional(Type9.String())
|
1853
|
-
},
|
2386
|
+
args: createArgs2("mariadb", ["external"]),
|
1854
2387
|
secrets: {
|
1855
|
-
rootPassword:
|
1856
|
-
},
|
1857
|
-
inputs: {
|
1858
|
-
k8sCluster: clusterEntity2,
|
1859
|
-
resticRepo: {
|
1860
|
-
entity: repoEntity,
|
1861
|
-
required: false
|
1862
|
-
},
|
1863
|
-
dnsProvider: {
|
1864
|
-
entity: providerEntity,
|
1865
|
-
required: false
|
1866
|
-
}
|
2388
|
+
rootPassword: Type12.Optional(Type12.String())
|
1867
2389
|
},
|
2390
|
+
inputs: createInputs(["resticRepo"]),
|
1868
2391
|
outputs: {
|
1869
2392
|
mariadb: mariadbEntity,
|
1870
2393
|
service: serviceEntity
|
@@ -1873,72 +2396,51 @@ var mariadb = defineUnit9({
|
|
1873
2396
|
displayName: "MariaDB",
|
1874
2397
|
description: "The MariaDB database deployed on Kubernetes.",
|
1875
2398
|
primaryIcon: "simple-icons:mariadb",
|
1876
|
-
secondaryIcon: "mdi:database"
|
2399
|
+
secondaryIcon: "mdi:database",
|
2400
|
+
category: "Databases"
|
1877
2401
|
},
|
1878
|
-
source:
|
1879
|
-
package: "@highstate/apps",
|
1880
|
-
path: "mariadb/app"
|
1881
|
-
}
|
2402
|
+
source: createSource("mariadb/app")
|
1882
2403
|
});
|
2404
|
+
extraInputDefinitions.mariadb = {
|
2405
|
+
entity: mariadbEntity,
|
2406
|
+
displayName: "MariaDB"
|
2407
|
+
};
|
1883
2408
|
var mariadbDatabase = defineUnit9({
|
1884
2409
|
type: "apps.mariadb.database",
|
1885
2410
|
args: {
|
1886
|
-
database:
|
1887
|
-
username:
|
2411
|
+
database: Type12.Optional(Type12.String()),
|
2412
|
+
username: Type12.Optional(Type12.String())
|
1888
2413
|
},
|
2414
|
+
inputs: createInputs(["mariadb"]),
|
1889
2415
|
secrets: {
|
1890
|
-
password:
|
1891
|
-
},
|
1892
|
-
inputs: {
|
1893
|
-
k8sCluster: clusterEntity2,
|
1894
|
-
mariadb: mariadbEntity
|
2416
|
+
password: Type12.Optional(Type12.String())
|
1895
2417
|
},
|
1896
2418
|
meta: {
|
1897
2419
|
displayName: "MariaDB Database",
|
1898
2420
|
description: "The virtual MariaDB database created on the MariaDB instance. Works only for MariaDB instances deployed on Kubernetes.",
|
1899
2421
|
primaryIcon: "simple-icons:mariadb",
|
1900
|
-
secondaryIcon: "mdi:database-plus"
|
2422
|
+
secondaryIcon: "mdi:database-plus",
|
2423
|
+
category: "Databases"
|
1901
2424
|
},
|
1902
|
-
source:
|
1903
|
-
package: "@highstate/apps",
|
1904
|
-
path: "mariadb/database"
|
1905
|
-
}
|
2425
|
+
source: createSource("mariadb/database")
|
1906
2426
|
});
|
1907
2427
|
|
1908
2428
|
// src/apps/postgresql.ts
|
1909
|
-
import { defineEntity as
|
1910
|
-
var postgresqlEntity =
|
2429
|
+
import { defineEntity as defineEntity11, defineUnit as defineUnit10, Type as Type13 } from "@highstate/contract";
|
2430
|
+
var postgresqlEntity = defineEntity11({
|
1911
2431
|
type: "apps.postgresql",
|
1912
|
-
schema:
|
1913
|
-
service: Type10.Optional(serviceEntity.schema),
|
1914
|
-
host: Type10.String(),
|
1915
|
-
port: Type10.Number(),
|
1916
|
-
rootPassword: Type10.String()
|
1917
|
-
}),
|
2432
|
+
schema: databaseSchema,
|
1918
2433
|
meta: {
|
1919
2434
|
color: "#336791"
|
1920
2435
|
}
|
1921
2436
|
});
|
1922
2437
|
var postgresql = defineUnit10({
|
1923
2438
|
type: "apps.postgresql",
|
1924
|
-
args:
|
1925
|
-
fqdn: Type10.Optional(Type10.String()),
|
1926
|
-
appName: Type10.Optional(Type10.String())
|
1927
|
-
},
|
2439
|
+
args: createArgs2("postgresql", ["external"]),
|
1928
2440
|
secrets: {
|
1929
|
-
rootPassword:
|
1930
|
-
},
|
1931
|
-
inputs: {
|
1932
|
-
k8sCluster: clusterEntity2,
|
1933
|
-
resticRepo: {
|
1934
|
-
entity: repoEntity,
|
1935
|
-
required: false
|
1936
|
-
},
|
1937
|
-
dnsProvider: {
|
1938
|
-
entity: providerEntity,
|
1939
|
-
required: false
|
1940
|
-
}
|
2441
|
+
rootPassword: Type13.Optional(Type13.String())
|
1941
2442
|
},
|
2443
|
+
inputs: createInputs(["resticRepo", "dnsProviders"]),
|
1942
2444
|
outputs: {
|
1943
2445
|
postgresql: postgresqlEntity,
|
1944
2446
|
service: serviceEntity
|
@@ -1947,77 +2449,259 @@ var postgresql = defineUnit10({
|
|
1947
2449
|
displayName: "PostgreSQL",
|
1948
2450
|
description: "The PostgreSQL database deployed on Kubernetes.",
|
1949
2451
|
primaryIcon: "simple-icons:postgresql",
|
1950
|
-
secondaryIcon: "mdi:database"
|
2452
|
+
secondaryIcon: "mdi:database",
|
2453
|
+
category: "Databases"
|
1951
2454
|
},
|
1952
|
-
source:
|
1953
|
-
package: "@highstate/apps",
|
1954
|
-
path: "postgresql/app"
|
1955
|
-
}
|
2455
|
+
source: createSource("postgresql/app")
|
1956
2456
|
});
|
2457
|
+
extraInputDefinitions.postgresql = {
|
2458
|
+
entity: postgresqlEntity,
|
2459
|
+
displayName: "PostgreSQL"
|
2460
|
+
};
|
1957
2461
|
var postgresqlDatabase = defineUnit10({
|
1958
2462
|
type: "apps.postgresql.database",
|
1959
2463
|
args: {
|
1960
|
-
database:
|
1961
|
-
username:
|
2464
|
+
database: Type13.Optional(Type13.String()),
|
2465
|
+
username: Type13.Optional(Type13.String())
|
1962
2466
|
},
|
1963
2467
|
secrets: {
|
1964
|
-
password:
|
1965
|
-
},
|
1966
|
-
inputs: {
|
1967
|
-
k8sCluster: clusterEntity2,
|
1968
|
-
postgresql: postgresqlEntity
|
2468
|
+
password: Type13.Optional(Type13.String())
|
1969
2469
|
},
|
2470
|
+
inputs: createInputs(["postgresql"]),
|
1970
2471
|
meta: {
|
1971
2472
|
displayName: "PostgreSQL Database",
|
1972
2473
|
description: "The virtual PostgreSQL database created on the PostgreSQL instance. Works only for PostgreSQL instances deployed on Kubernetes.",
|
1973
2474
|
primaryIcon: "simple-icons:postgresql",
|
1974
|
-
secondaryIcon: "mdi:database-plus"
|
2475
|
+
secondaryIcon: "mdi:database-plus",
|
2476
|
+
category: "Databases"
|
1975
2477
|
},
|
1976
|
-
source:
|
1977
|
-
package: "@highstate/apps",
|
1978
|
-
path: "postgresql/database"
|
1979
|
-
}
|
2478
|
+
source: createSource("postgresql/database")
|
1980
2479
|
});
|
1981
2480
|
|
1982
2481
|
// src/apps/vaultwarden.ts
|
1983
|
-
import { defineUnit as defineUnit11, Type as
|
2482
|
+
import { defineUnit as defineUnit11, Type as Type14 } from "@highstate/contract";
|
1984
2483
|
var vaultwarden = defineUnit11({
|
1985
2484
|
type: "apps.vaultwarden",
|
2485
|
+
args: createArgs2("vaultwarden", ["fqdn"]),
|
2486
|
+
secrets: {
|
2487
|
+
mariadbPassword: Type14.Optional(Type14.String())
|
2488
|
+
},
|
2489
|
+
inputs: createInputs(["accessPoint", "mariadb"]),
|
2490
|
+
meta: {
|
2491
|
+
displayName: "Vaultwarden",
|
2492
|
+
description: "The Vaultwarden password manager deployed on Kubernetes.",
|
2493
|
+
primaryIcon: "simple-icons:vaultwarden",
|
2494
|
+
category: "Security"
|
2495
|
+
},
|
2496
|
+
source: createSource("vaultwarden")
|
2497
|
+
});
|
2498
|
+
|
2499
|
+
// src/apps/mongodb.ts
|
2500
|
+
import { defineEntity as defineEntity12, defineUnit as defineUnit12, Type as Type15 } from "@highstate/contract";
|
2501
|
+
var mongodbEntity = defineEntity12({
|
2502
|
+
type: "apps.mongodb",
|
2503
|
+
schema: databaseSchema,
|
2504
|
+
meta: {
|
2505
|
+
color: "#13aa52"
|
2506
|
+
}
|
2507
|
+
});
|
2508
|
+
var mongodb = defineUnit12({
|
2509
|
+
type: "apps.mongodb",
|
2510
|
+
args: createArgs2("mongodb", ["external"]),
|
2511
|
+
secrets: {
|
2512
|
+
rootPassword: Type15.Optional(Type15.String())
|
2513
|
+
},
|
2514
|
+
inputs: createInputs(["resticRepo"]),
|
2515
|
+
outputs: {
|
2516
|
+
mongodb: mongodbEntity,
|
2517
|
+
service: serviceEntity
|
2518
|
+
},
|
2519
|
+
meta: {
|
2520
|
+
displayName: "MongoDB",
|
2521
|
+
description: "The MongoDB instance deployed on Kubernetes.",
|
2522
|
+
primaryIcon: "simple-icons:mongodb",
|
2523
|
+
secondaryIcon: "mdi:database",
|
2524
|
+
category: "Databases"
|
2525
|
+
},
|
2526
|
+
source: createSource("mongodb/app")
|
2527
|
+
});
|
2528
|
+
extraInputDefinitions.mongodb = {
|
2529
|
+
entity: mongodbEntity,
|
2530
|
+
displayName: "MongoDB"
|
2531
|
+
};
|
2532
|
+
var mongodbDatabase = defineUnit12({
|
2533
|
+
type: "apps.mongodb.database",
|
2534
|
+
args: {
|
2535
|
+
database: Type15.Optional(Type15.String()),
|
2536
|
+
username: Type15.Optional(Type15.String())
|
2537
|
+
},
|
2538
|
+
secrets: {
|
2539
|
+
password: Type15.Optional(Type15.String())
|
2540
|
+
},
|
2541
|
+
inputs: createInputs(["mongodb"]),
|
2542
|
+
meta: {
|
2543
|
+
displayName: "MongoDB Database",
|
2544
|
+
description: "The virtual MongoDB database created on the MongoDB instance. Works only for MongoDB instances deployed on Kubernetes.",
|
2545
|
+
primaryIcon: "simple-icons:mongodb",
|
2546
|
+
secondaryIcon: "mdi:database-plus",
|
2547
|
+
category: "Databases"
|
2548
|
+
},
|
2549
|
+
source: createSource("mongodb/database")
|
2550
|
+
});
|
2551
|
+
|
2552
|
+
// src/apps/network.ts
|
2553
|
+
import { defineUnit as defineUnit13, Type as Type16 } from "@highstate/contract";
|
2554
|
+
var explicitEndpointFilterSchema = Type16.StringEnum(["public", "external", "internal"]);
|
2555
|
+
var endpointFilter = defineUnit13({
|
2556
|
+
type: "apps.endpoint-filter",
|
1986
2557
|
args: {
|
1987
|
-
|
1988
|
-
|
2558
|
+
/**
|
2559
|
+
* The filter to apply to the endpoints.
|
2560
|
+
*
|
2561
|
+
* - `public`: Only public endpoints accessible from the internet.
|
2562
|
+
* - `external`: Only external endpoints (e.g. NodePort, LoadBalancer) accessible from outside the cluster, but not from the internet.
|
2563
|
+
* - `internal`: Only internal endpoints (e.g. ClusterIP) accessible from within the cluster.
|
2564
|
+
*/
|
2565
|
+
filter: Type16.Default(explicitEndpointFilterSchema, "public")
|
1989
2566
|
},
|
1990
2567
|
inputs: {
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
2568
|
+
l3Endpoints: {
|
2569
|
+
entity: l3EndpointEntity,
|
2570
|
+
multiple: true,
|
2571
|
+
required: false
|
2572
|
+
},
|
2573
|
+
l4Endpoints: {
|
2574
|
+
entity: l4EndpointEntity,
|
2575
|
+
multiple: true,
|
2576
|
+
required: false
|
2577
|
+
}
|
2578
|
+
},
|
2579
|
+
outputs: {
|
2580
|
+
l3Endpoints: {
|
2581
|
+
entity: l3EndpointEntity,
|
2582
|
+
multiple: true
|
2583
|
+
},
|
2584
|
+
l4Endpoints: {
|
2585
|
+
entity: l4EndpointEntity,
|
2586
|
+
multiple: true
|
2587
|
+
}
|
2588
|
+
},
|
2589
|
+
meta: {
|
2590
|
+
displayName: "Endpoint Filter",
|
2591
|
+
description: "Explicitly filter endpoints by their accessibility.",
|
2592
|
+
primaryIcon: "mdi:network-outline",
|
2593
|
+
primaryIconColor: "#FF9800",
|
2594
|
+
secondaryIcon: "mdi:filter-outline",
|
2595
|
+
category: "Network"
|
2596
|
+
},
|
2597
|
+
source: createSource("endpoint-filter")
|
2598
|
+
});
|
2599
|
+
|
2600
|
+
// src/apps/dns.ts
|
2601
|
+
import { defineUnit as defineUnit14, Type as Type17 } from "@highstate/contract";
|
2602
|
+
var endpointFilterSchema2 = Type17.StringEnum(["all", "public", "external", "internal"]);
|
2603
|
+
var recordSet = defineUnit14({
|
2604
|
+
type: "apps.dns-record-set",
|
2605
|
+
args: {
|
2606
|
+
/**
|
2607
|
+
* The name of the DNS record.
|
2608
|
+
*
|
2609
|
+
* If not provided, will use the name of the unit.
|
2610
|
+
*/
|
2611
|
+
recordName: Type17.Optional(Type17.String()),
|
2612
|
+
/**
|
2613
|
+
* The type of the DNS record.
|
2614
|
+
*
|
2615
|
+
* If not specified, will use the default type for the provider.
|
2616
|
+
*/
|
2617
|
+
type: Type17.Optional(Type17.String()),
|
2618
|
+
/**
|
2619
|
+
* The values of the DNS record.
|
2620
|
+
*/
|
2621
|
+
values: Type17.Array(Type17.String()),
|
2622
|
+
/**
|
2623
|
+
* The TTL of the DNS record.
|
2624
|
+
*/
|
2625
|
+
ttl: Type17.Optional(Type17.Number()),
|
2626
|
+
/**
|
2627
|
+
* The priority of the DNS record.
|
2628
|
+
*/
|
2629
|
+
priority: Type17.Optional(Type17.Number()),
|
2630
|
+
/**
|
2631
|
+
* Whether the DNS record is proxied.
|
2632
|
+
*
|
2633
|
+
* Available only for public IPs and some DNS providers like Cloudflare.
|
2634
|
+
*/
|
2635
|
+
proxied: Type17.Optional(Type17.Boolean()),
|
2636
|
+
/**
|
2637
|
+
* The filter to apply to the endpoints.
|
2638
|
+
*
|
2639
|
+
* - `all`: All endpoints.
|
2640
|
+
* - `public`: Only public endpoints accessible from the internet (default).
|
2641
|
+
* - `external`: Only external endpoints (e.g. NodePort, LoadBalancer) accessible from outside the cluster, but not from the internet.
|
2642
|
+
* - `internal`: Only internal endpoints (e.g. ClusterIP) accessible from within the cluster.
|
2643
|
+
*/
|
2644
|
+
endpointFilter: Type17.Default(endpointFilterSchema2, "public")
|
2645
|
+
},
|
2646
|
+
inputs: {
|
2647
|
+
dnsProviders: {
|
2648
|
+
entity: providerEntity,
|
2649
|
+
multiple: true
|
2650
|
+
},
|
2651
|
+
l3Endpoints: {
|
2652
|
+
entity: l3EndpointEntity,
|
2653
|
+
required: false,
|
2654
|
+
multiple: true
|
2655
|
+
},
|
2656
|
+
l4Endpoints: {
|
2657
|
+
entity: l4EndpointEntity,
|
2658
|
+
required: false,
|
2659
|
+
multiple: true
|
2660
|
+
}
|
1994
2661
|
},
|
1995
|
-
|
1996
|
-
|
2662
|
+
outputs: {
|
2663
|
+
/**
|
2664
|
+
* The single L3 endpoint representing created DNS records.
|
2665
|
+
*/
|
2666
|
+
l3Endpoint: l3EndpointEntity,
|
2667
|
+
/**
|
2668
|
+
* Multiple L4 endpoints representing created DNS records for each unique port/protocol combination from the input L4 endpoints.
|
2669
|
+
*/
|
2670
|
+
l4Endpoints: {
|
2671
|
+
entity: l4EndpointEntity,
|
2672
|
+
multiple: true
|
2673
|
+
}
|
1997
2674
|
},
|
1998
2675
|
meta: {
|
1999
|
-
displayName: "
|
2000
|
-
description: "
|
2001
|
-
primaryIcon: "
|
2676
|
+
displayName: "DNS Record Set",
|
2677
|
+
description: "A set of DNS records to be created.",
|
2678
|
+
primaryIcon: "mdi:server",
|
2679
|
+
defaultNamePrefix: "record",
|
2680
|
+
category: "Network"
|
2002
2681
|
},
|
2003
|
-
source:
|
2004
|
-
package: "@highstate/apps",
|
2005
|
-
path: "vaultwarden"
|
2006
|
-
}
|
2682
|
+
source: createSource("dns-record-set")
|
2007
2683
|
});
|
2684
|
+
var sharedArgs = {
|
2685
|
+
/**
|
2686
|
+
* The FQDN to register the cluster nodes with.
|
2687
|
+
*
|
2688
|
+
* @schema
|
2689
|
+
*/
|
2690
|
+
fqdn: {
|
2691
|
+
...Type17.Optional(Type17.String()),
|
2692
|
+
description: `The FQDN to register the cluster nodes with.`
|
2693
|
+
}
|
2694
|
+
};
|
2008
2695
|
|
2009
2696
|
// src/apps/traefik.ts
|
2010
|
-
import { defineUnit as
|
2011
|
-
var traefikGateway =
|
2697
|
+
import { defineUnit as defineUnit15, Type as Type18 } from "@highstate/contract";
|
2698
|
+
var traefikGateway = defineUnit15({
|
2012
2699
|
type: "apps.traefik-gateway",
|
2013
2700
|
args: {
|
2014
|
-
|
2015
|
-
className:
|
2016
|
-
serviceType: Type12.Optional(serviceTypeSchema)
|
2017
|
-
},
|
2018
|
-
inputs: {
|
2019
|
-
k8sCluster: clusterEntity2
|
2701
|
+
...createArgs2("traefik", ["external"]),
|
2702
|
+
className: Type18.Optional(Type18.String())
|
2020
2703
|
},
|
2704
|
+
inputs: createInputs(),
|
2021
2705
|
outputs: {
|
2022
2706
|
gateway: gatewayEntity,
|
2023
2707
|
service: serviceEntity
|
@@ -2025,7 +2709,8 @@ var traefikGateway = defineUnit12({
|
|
2025
2709
|
meta: {
|
2026
2710
|
displayName: "Traefik Gateway",
|
2027
2711
|
description: "A Traefik gateway for routing traffic to services.",
|
2028
|
-
primaryIcon: "simple-icons:traefikproxy"
|
2712
|
+
primaryIcon: "simple-icons:traefikproxy",
|
2713
|
+
category: "Network"
|
2029
2714
|
},
|
2030
2715
|
source: {
|
2031
2716
|
package: "@highstate/apps",
|
@@ -2034,250 +2719,128 @@ var traefikGateway = defineUnit12({
|
|
2034
2719
|
});
|
2035
2720
|
|
2036
2721
|
// src/apps/kubernetes-dashboard.ts
|
2037
|
-
import { defineUnit as
|
2038
|
-
var kubernetesDashboard =
|
2722
|
+
import { defineUnit as defineUnit16 } from "@highstate/contract";
|
2723
|
+
var kubernetesDashboard = defineUnit16({
|
2039
2724
|
type: "apps.kubernetes-dashboard",
|
2040
|
-
args:
|
2041
|
-
|
2042
|
-
appName: Type13.Optional(Type13.String())
|
2043
|
-
},
|
2044
|
-
inputs: {
|
2045
|
-
k8sCluster: clusterEntity2,
|
2046
|
-
accessPoint: accessPointEntity
|
2047
|
-
},
|
2725
|
+
args: createArgs2("kubernetes-dashboard", ["fqdn"]),
|
2726
|
+
inputs: createInputs(["accessPoint"]),
|
2048
2727
|
meta: {
|
2049
2728
|
displayName: "Kubernetes Dashboard",
|
2050
2729
|
description: "The Kubernetes Dashboard deployed on Kubernetes.",
|
2051
|
-
primaryIcon: "
|
2052
|
-
secondaryIcon: "
|
2730
|
+
primaryIcon: "devicon:kubernetes",
|
2731
|
+
secondaryIcon: "material-symbols:dashboard",
|
2732
|
+
category: "Kubernetes"
|
2053
2733
|
},
|
2054
|
-
source:
|
2055
|
-
package: "@highstate/apps",
|
2056
|
-
path: "kubernetes-dashboard"
|
2057
|
-
}
|
2734
|
+
source: createSource("kubernetes-dashboard")
|
2058
2735
|
});
|
2059
2736
|
|
2060
2737
|
// src/apps/grocy.ts
|
2061
|
-
import { defineUnit as
|
2062
|
-
var grocy =
|
2738
|
+
import { defineUnit as defineUnit17 } from "@highstate/contract";
|
2739
|
+
var grocy = defineUnit17({
|
2063
2740
|
type: "apps.grocy",
|
2064
|
-
args:
|
2065
|
-
|
2066
|
-
appName: Type14.Optional(Type14.String())
|
2067
|
-
},
|
2068
|
-
inputs: {
|
2069
|
-
resticRepo: {
|
2070
|
-
entity: repoEntity,
|
2071
|
-
required: false
|
2072
|
-
},
|
2073
|
-
accessPoint: accessPointEntity,
|
2074
|
-
k8sCluster: clusterEntity2
|
2075
|
-
},
|
2741
|
+
args: createArgs2("grocy", ["fqdn"]),
|
2742
|
+
inputs: createInputs(["accessPoint", "resticRepo"]),
|
2076
2743
|
meta: {
|
2077
2744
|
displayName: "Grocy",
|
2078
2745
|
description: "Grocy is a web-based self-hosted groceries & household management solution for your home.",
|
2079
|
-
primaryIcon: "simple-icons:grocy"
|
2746
|
+
primaryIcon: "simple-icons:grocy",
|
2747
|
+
category: "Productivity"
|
2080
2748
|
},
|
2081
|
-
source:
|
2082
|
-
package: "@highstate/apps",
|
2083
|
-
path: "grocy"
|
2084
|
-
}
|
2749
|
+
source: createSource("grocy")
|
2085
2750
|
});
|
2086
2751
|
|
2087
2752
|
// src/apps/maybe.ts
|
2088
|
-
import { defineUnit as
|
2089
|
-
var maybe =
|
2753
|
+
import { defineUnit as defineUnit18, Type as Type19 } from "@highstate/contract";
|
2754
|
+
var maybe = defineUnit18({
|
2090
2755
|
type: "apps.maybe",
|
2091
|
-
args:
|
2092
|
-
fqdn: Type15.String(),
|
2093
|
-
appName: Type15.Optional(Type15.String())
|
2094
|
-
},
|
2095
|
-
inputs: {
|
2096
|
-
postgresql: postgresqlEntity,
|
2097
|
-
accessPoint: accessPointEntity,
|
2098
|
-
k8sCluster: clusterEntity2,
|
2099
|
-
resticRepo: {
|
2100
|
-
entity: repoEntity,
|
2101
|
-
required: false
|
2102
|
-
}
|
2103
|
-
},
|
2756
|
+
args: createArgs2("maybe", ["fqdn"]),
|
2104
2757
|
secrets: {
|
2105
|
-
postgresqlPassword:
|
2106
|
-
secretKey:
|
2758
|
+
postgresqlPassword: Type19.Optional(Type19.String()),
|
2759
|
+
secretKey: Type19.Optional(Type19.String())
|
2107
2760
|
},
|
2761
|
+
inputs: createInputs(["accessPoint", "resticRepo", "postgresql"]),
|
2108
2762
|
meta: {
|
2109
2763
|
displayName: "Maybe",
|
2110
2764
|
description: "The OS for your personal finances.",
|
2111
|
-
primaryIcon: "arcticons:finance-manager"
|
2112
|
-
|
2113
|
-
source: {
|
2114
|
-
package: "@highstate/apps",
|
2115
|
-
path: "maybe"
|
2116
|
-
}
|
2117
|
-
});
|
2118
|
-
|
2119
|
-
// src/apps/mongodb.ts
|
2120
|
-
import { defineEntity as defineEntity11, defineUnit as defineUnit16, Type as Type16 } from "@highstate/contract";
|
2121
|
-
var mongodbEntity = defineEntity11({
|
2122
|
-
type: "apps.mongodb",
|
2123
|
-
schema: Type16.Object({
|
2124
|
-
service: Type16.Optional(serviceEntity.schema),
|
2125
|
-
host: Type16.String(),
|
2126
|
-
port: Type16.Number(),
|
2127
|
-
rootPassword: Type16.String()
|
2128
|
-
}),
|
2129
|
-
meta: {
|
2130
|
-
color: "#13aa52"
|
2131
|
-
}
|
2132
|
-
});
|
2133
|
-
var mongodb = defineUnit16({
|
2134
|
-
type: "apps.mongodb",
|
2135
|
-
args: {
|
2136
|
-
fqdn: Type16.Optional(Type16.String()),
|
2137
|
-
appName: Type16.Optional(Type16.String()),
|
2138
|
-
serviceType: Type16.Optional(serviceTypeSchema)
|
2139
|
-
},
|
2140
|
-
secrets: {
|
2141
|
-
rootPassword: Type16.Optional(Type16.String())
|
2142
|
-
},
|
2143
|
-
inputs: {
|
2144
|
-
k8sCluster: clusterEntity2,
|
2145
|
-
resticRepo: {
|
2146
|
-
entity: repoEntity,
|
2147
|
-
required: false
|
2148
|
-
},
|
2149
|
-
dnsProvider: {
|
2150
|
-
entity: providerEntity,
|
2151
|
-
required: false
|
2152
|
-
}
|
2153
|
-
},
|
2154
|
-
outputs: {
|
2155
|
-
mongodb: mongodbEntity,
|
2156
|
-
service: serviceEntity
|
2157
|
-
},
|
2158
|
-
meta: {
|
2159
|
-
displayName: "MongoDB",
|
2160
|
-
description: "The MongoDB instance deployed on Kubernetes.",
|
2161
|
-
primaryIcon: "simple-icons:mongodb",
|
2162
|
-
secondaryIcon: "mdi:database"
|
2163
|
-
},
|
2164
|
-
source: {
|
2165
|
-
package: "@highstate/apps",
|
2166
|
-
path: "mongodb/app"
|
2167
|
-
}
|
2168
|
-
});
|
2169
|
-
var mongodbDatabase = defineUnit16({
|
2170
|
-
type: "apps.mongodb.database",
|
2171
|
-
args: {
|
2172
|
-
database: Type16.Optional(Type16.String()),
|
2173
|
-
username: Type16.Optional(Type16.String())
|
2174
|
-
},
|
2175
|
-
secrets: {
|
2176
|
-
password: Type16.Optional(Type16.String())
|
2177
|
-
},
|
2178
|
-
inputs: {
|
2179
|
-
k8sCluster: clusterEntity2,
|
2180
|
-
mongodb: mongodbEntity
|
2181
|
-
},
|
2182
|
-
meta: {
|
2183
|
-
displayName: "MongoDB Database",
|
2184
|
-
description: "The virtual MongoDB database created on the MongoDB instance. Works only for MongoDB instances deployed on Kubernetes.",
|
2185
|
-
primaryIcon: "simple-icons:mongodb",
|
2186
|
-
secondaryIcon: "mdi:database-plus"
|
2765
|
+
primaryIcon: "arcticons:finance-manager",
|
2766
|
+
category: "Finance"
|
2187
2767
|
},
|
2188
|
-
source:
|
2189
|
-
package: "@highstate/apps",
|
2190
|
-
path: "mongodb/database"
|
2191
|
-
}
|
2768
|
+
source: createSource("maybe")
|
2192
2769
|
});
|
2193
2770
|
|
2194
2771
|
// src/apps/deployment.ts
|
2195
|
-
import { defineUnit as
|
2196
|
-
var deployment =
|
2772
|
+
import { defineUnit as defineUnit19, Type as Type20 } from "@highstate/contract";
|
2773
|
+
var deployment = defineUnit19({
|
2197
2774
|
type: "apps.deployment",
|
2198
2775
|
args: {
|
2199
|
-
appName:
|
2200
|
-
fqdn:
|
2201
|
-
serviceType:
|
2202
|
-
image:
|
2203
|
-
port:
|
2204
|
-
replicas:
|
2205
|
-
dataPath:
|
2206
|
-
env:
|
2207
|
-
mariadbEnvMapping:
|
2208
|
-
postgresqlEnvMapping:
|
2209
|
-
mongodbEnvMapping:
|
2210
|
-
manifest:
|
2211
|
-
serviceManifest:
|
2212
|
-
httpRouteManifest:
|
2213
|
-
},
|
2214
|
-
inputs: {
|
2215
|
-
k8sCluster: clusterEntity2,
|
2216
|
-
mariadb: {
|
2217
|
-
entity: mariadbEntity,
|
2218
|
-
required: false
|
2219
|
-
},
|
2220
|
-
postgresql: {
|
2221
|
-
entity: postgresqlEntity,
|
2222
|
-
required: false
|
2223
|
-
},
|
2224
|
-
mongodb: {
|
2225
|
-
entity: mongodbEntity,
|
2226
|
-
required: false
|
2227
|
-
},
|
2228
|
-
resticRepo: {
|
2229
|
-
entity: repoEntity,
|
2230
|
-
required: false
|
2231
|
-
},
|
2232
|
-
dnsProvider: {
|
2233
|
-
entity: providerEntity,
|
2234
|
-
required: false
|
2235
|
-
}
|
2776
|
+
appName: Type20.Optional(Type20.String()),
|
2777
|
+
fqdn: Type20.Optional(Type20.String()),
|
2778
|
+
serviceType: Type20.Optional(serviceTypeSchema),
|
2779
|
+
image: Type20.Optional(Type20.String()),
|
2780
|
+
port: Type20.Optional(Type20.Number()),
|
2781
|
+
replicas: Type20.Optional(Type20.Number()),
|
2782
|
+
dataPath: Type20.Optional(Type20.String()),
|
2783
|
+
env: Type20.Optional(Type20.Record(Type20.String(), Type20.Any())),
|
2784
|
+
mariadbEnvMapping: Type20.Optional(Type20.Record(Type20.String(), Type20.Any())),
|
2785
|
+
postgresqlEnvMapping: Type20.Optional(Type20.Record(Type20.String(), Type20.Any())),
|
2786
|
+
mongodbEnvMapping: Type20.Optional(Type20.Record(Type20.String(), Type20.Any())),
|
2787
|
+
manifest: Type20.Optional(Type20.Record(Type20.String(), Type20.Any())),
|
2788
|
+
serviceManifest: Type20.Optional(Type20.Record(Type20.String(), Type20.Any())),
|
2789
|
+
httpRouteManifest: Type20.Optional(Type20.Record(Type20.String(), Type20.Any()))
|
2236
2790
|
},
|
2791
|
+
secrets: {
|
2792
|
+
mariadbPassword: Type20.Optional(Type20.String()),
|
2793
|
+
postgresqlPassword: Type20.Optional(Type20.String()),
|
2794
|
+
mongodbPassword: Type20.Optional(Type20.String())
|
2795
|
+
},
|
2796
|
+
inputs: createInputs([
|
2797
|
+
"accessPoint",
|
2798
|
+
"mariadb",
|
2799
|
+
"postgresql",
|
2800
|
+
"mongodb",
|
2801
|
+
"resticRepo",
|
2802
|
+
"dnsProviders"
|
2803
|
+
]),
|
2237
2804
|
outputs: {
|
2238
2805
|
deployment: deploymentEntity,
|
2239
2806
|
service: serviceEntity
|
2240
2807
|
},
|
2241
|
-
secrets: {
|
2242
|
-
mariadbPassword: Type17.Optional(Type17.String()),
|
2243
|
-
postgresqlPassword: Type17.Optional(Type17.String()),
|
2244
|
-
mongodbPassword: Type17.Optional(Type17.String())
|
2245
|
-
},
|
2246
2808
|
meta: {
|
2247
2809
|
displayName: "Kubernetes Deployment",
|
2248
2810
|
description: "A generic Kubernetes deployment with optional service and gateway routes.",
|
2249
|
-
primaryIcon: "
|
2250
|
-
secondaryIcon: "mdi:cube-outline"
|
2811
|
+
primaryIcon: "devicon:kubernetes",
|
2812
|
+
secondaryIcon: "mdi:cube-outline",
|
2813
|
+
category: "Kubernetes"
|
2251
2814
|
},
|
2252
|
-
source:
|
2253
|
-
package: "@highstate/apps",
|
2254
|
-
path: "deployment"
|
2255
|
-
}
|
2815
|
+
source: createSource("deployment")
|
2256
2816
|
});
|
2257
2817
|
|
2258
2818
|
// src/apps/syncthing.ts
|
2259
|
-
import { defineUnit as
|
2260
|
-
var backupModeSchema =
|
2261
|
-
var syncthing =
|
2819
|
+
import { defineUnit as defineUnit20, Type as Type21 } from "@highstate/contract";
|
2820
|
+
var backupModeSchema = Type21.StringEnum(["state", "full"]);
|
2821
|
+
var syncthing = defineUnit20({
|
2262
2822
|
type: "apps.syncthing",
|
2263
2823
|
args: {
|
2264
|
-
fqdn
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2824
|
+
...createArgs2("syncthing", ["fqdn"]),
|
2825
|
+
/**
|
2826
|
+
* The FQDN of the Syncthing instance used to sync with other devices.
|
2827
|
+
*
|
2828
|
+
* The `fqdn` argument unlike this one points to the gateway and used to
|
2829
|
+
* access the Syncthing Web UI.
|
2830
|
+
*/
|
2831
|
+
deviceFqdn: Type21.Optional(Type21.String()),
|
2832
|
+
/**
|
2833
|
+
* The backup mode to use for the Syncthing instance.
|
2834
|
+
*
|
2835
|
+
* - `state`: Only the state is backed up. When the instance is restored, it will
|
2836
|
+
* sync files from the other devices automatically.
|
2837
|
+
* - `full`: A full backup is created including all files.
|
2838
|
+
*
|
2839
|
+
* The default is `state`.
|
2840
|
+
*/
|
2841
|
+
backupMode: Type21.Default(backupModeSchema, "state")
|
2280
2842
|
},
|
2843
|
+
inputs: createInputs(["accessPoint", "resticRepo", "dnsProviders", "volume"]),
|
2281
2844
|
outputs: {
|
2282
2845
|
service: serviceEntity,
|
2283
2846
|
volume: persistentVolumeClaimEntity
|
@@ -2285,38 +2848,22 @@ var syncthing = defineUnit18({
|
|
2285
2848
|
meta: {
|
2286
2849
|
displayName: "Syncthing",
|
2287
2850
|
description: "The Syncthing instance deployed on Kubernetes.",
|
2288
|
-
primaryIcon: "simple-icons:syncthing"
|
2851
|
+
primaryIcon: "simple-icons:syncthing",
|
2852
|
+
category: "File Sync"
|
2289
2853
|
},
|
2290
|
-
source:
|
2291
|
-
package: "@highstate/apps",
|
2292
|
-
path: "syncthing"
|
2293
|
-
}
|
2854
|
+
source: createSource("syncthing")
|
2294
2855
|
});
|
2295
2856
|
|
2296
2857
|
// src/apps/code-server.ts
|
2297
|
-
import { defineUnit as
|
2298
|
-
var codeServer =
|
2858
|
+
import { defineUnit as defineUnit21, Type as Type22 } from "@highstate/contract";
|
2859
|
+
var codeServer = defineUnit21({
|
2299
2860
|
type: "apps.code-server",
|
2300
|
-
args:
|
2301
|
-
fqdn: Type19.String(),
|
2302
|
-
appName: Type19.Optional(Type19.String())
|
2303
|
-
},
|
2861
|
+
args: createArgs2("code-server", ["fqdn"]),
|
2304
2862
|
secrets: {
|
2305
|
-
password:
|
2306
|
-
sudoPassword:
|
2307
|
-
},
|
2308
|
-
inputs: {
|
2309
|
-
accessPoint: accessPointEntity,
|
2310
|
-
k8sCluster: clusterEntity2,
|
2311
|
-
resticRepo: {
|
2312
|
-
entity: repoEntity,
|
2313
|
-
required: false
|
2314
|
-
},
|
2315
|
-
volume: {
|
2316
|
-
entity: persistentVolumeClaimEntity,
|
2317
|
-
required: false
|
2318
|
-
}
|
2863
|
+
password: Type22.Optional(Type22.String()),
|
2864
|
+
sudoPassword: Type22.Optional(Type22.String())
|
2319
2865
|
},
|
2866
|
+
inputs: createInputs(["accessPoint", "resticRepo", "dnsProviders", "volume"]),
|
2320
2867
|
outputs: {
|
2321
2868
|
statefulSet: statefulSetEntity,
|
2322
2869
|
volume: persistentVolumeClaimEntity
|
@@ -2324,7 +2871,8 @@ var codeServer = defineUnit19({
|
|
2324
2871
|
meta: {
|
2325
2872
|
displayName: "Code Server",
|
2326
2873
|
description: "The Code Server instance deployed on Kubernetes.",
|
2327
|
-
primaryIcon: "material-icon-theme:vscode"
|
2874
|
+
primaryIcon: "material-icon-theme:vscode",
|
2875
|
+
category: "Development"
|
2328
2876
|
},
|
2329
2877
|
source: {
|
2330
2878
|
package: "@highstate/apps",
|
@@ -2337,11 +2885,11 @@ var cloudflare_exports = {};
|
|
2337
2885
|
__export(cloudflare_exports, {
|
2338
2886
|
connection: () => connection2
|
2339
2887
|
});
|
2340
|
-
import { defineUnit as
|
2341
|
-
var connection2 =
|
2888
|
+
import { defineUnit as defineUnit22, Type as Type23 } from "@highstate/contract";
|
2889
|
+
var connection2 = defineUnit22({
|
2342
2890
|
type: "cloudflare.connection",
|
2343
2891
|
secrets: {
|
2344
|
-
apiToken:
|
2892
|
+
apiToken: Type23.String()
|
2345
2893
|
},
|
2346
2894
|
outputs: {
|
2347
2895
|
dnsProvider: providerEntity
|
@@ -2349,7 +2897,8 @@ var connection2 = defineUnit20({
|
|
2349
2897
|
meta: {
|
2350
2898
|
displayName: "Cloudflare Connection",
|
2351
2899
|
description: "Creates a new Cloudflare connection for one zone.",
|
2352
|
-
primaryIcon: "simple-icons:cloudflare"
|
2900
|
+
primaryIcon: "simple-icons:cloudflare",
|
2901
|
+
category: "Cloudflare"
|
2353
2902
|
},
|
2354
2903
|
source: {
|
2355
2904
|
package: "@highstate/cloudflare",
|
@@ -2362,25 +2911,39 @@ var k3s_exports = {};
|
|
2362
2911
|
__export(k3s_exports, {
|
2363
2912
|
cluster: () => cluster2
|
2364
2913
|
});
|
2365
|
-
import { defineUnit as
|
2366
|
-
|
2367
|
-
var cluster2 = defineUnit21({
|
2914
|
+
import { defineUnit as defineUnit23, Type as Type24 } from "@highstate/contract";
|
2915
|
+
var cluster2 = defineUnit23({
|
2368
2916
|
type: "k3s.cluster",
|
2369
2917
|
args: {
|
2370
|
-
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2918
|
+
/**
|
2919
|
+
* The K3S configuration to pass to each server or agent in the cluster.
|
2920
|
+
*
|
2921
|
+
* See: https://docs.k3s.io/installation/configuration
|
2922
|
+
*
|
2923
|
+
* @schema
|
2924
|
+
*/
|
2925
|
+
config: {
|
2926
|
+
...Type24.Optional(Type24.Record(Type24.String(), Type24.Any())),
|
2927
|
+
description: `The K3S configuration to pass to each server or agent in the cluster.
|
2928
|
+
|
2929
|
+
See: https://docs.k3s.io/installation/configuration`
|
2930
|
+
},
|
2931
|
+
/**
|
2932
|
+
* The configuration of the registries to use for the K3S cluster.
|
2933
|
+
*
|
2934
|
+
* See: https://docs.k3s.io/installation/private-registry
|
2935
|
+
*
|
2936
|
+
* @schema
|
2937
|
+
*/
|
2938
|
+
registries: {
|
2939
|
+
...Type24.Optional(Type24.Record(Type24.String(), Type24.Any())),
|
2940
|
+
description: `The configuration of the registries to use for the K3S cluster.
|
2941
|
+
|
2942
|
+
See: https://docs.k3s.io/installation/private-registry`
|
2379
2943
|
}
|
2380
2944
|
},
|
2381
|
-
|
2382
|
-
|
2383
|
-
},
|
2945
|
+
inputs: clusterInputs,
|
2946
|
+
outputs: clusterOutputs,
|
2384
2947
|
meta: {
|
2385
2948
|
displayName: "K3s Cluster",
|
2386
2949
|
description: "The K3s cluster created on top of the server.",
|
@@ -2397,27 +2960,20 @@ var cluster2 = defineUnit21({
|
|
2397
2960
|
// src/mullvad.ts
|
2398
2961
|
var mullvad_exports = {};
|
2399
2962
|
__export(mullvad_exports, {
|
2400
|
-
endpointType: () => endpointType,
|
2401
2963
|
peer: () => peer2
|
2402
2964
|
});
|
2403
|
-
import { defineUnit as
|
2404
|
-
var
|
2405
|
-
Type22.Literal("fqdn"),
|
2406
|
-
Type22.Literal("ipv4"),
|
2407
|
-
Type22.Literal("ipv6")
|
2408
|
-
]);
|
2409
|
-
var peer2 = defineUnit22({
|
2965
|
+
import { defineUnit as defineUnit24, Type as Type25 } from "@highstate/contract";
|
2966
|
+
var peer2 = defineUnit24({
|
2410
2967
|
type: "mullvad.peer",
|
2411
2968
|
args: {
|
2412
|
-
hostname:
|
2413
|
-
endpointType: Type22.Optional({ ...endpointType, default: "fqdn" }),
|
2969
|
+
hostname: Type25.Optional(Type25.String()),
|
2414
2970
|
/**
|
2415
2971
|
* Whether to include Mullvad DNS servers in the peer configuration.
|
2416
2972
|
*
|
2417
2973
|
* @schema
|
2418
2974
|
*/
|
2419
2975
|
includeDns: {
|
2420
|
-
...
|
2976
|
+
...Type25.Default(Type25.Boolean(), true),
|
2421
2977
|
description: `Whether to include Mullvad DNS servers in the peer configuration.`
|
2422
2978
|
}
|
2423
2979
|
},
|
@@ -2434,14 +2990,18 @@ var peer2 = defineUnit22({
|
|
2434
2990
|
},
|
2435
2991
|
outputs: {
|
2436
2992
|
peer: peerEntity,
|
2437
|
-
|
2993
|
+
endpoints: {
|
2994
|
+
entity: l4EndpointEntity,
|
2995
|
+
multiple: true
|
2996
|
+
}
|
2438
2997
|
},
|
2439
2998
|
meta: {
|
2440
2999
|
displayName: "Mullvad Peer",
|
2441
3000
|
description: "The Mullvad WireGuard peer fetched from the Mullvad API.",
|
2442
3001
|
primaryIcon: "simple-icons:mullvad",
|
2443
3002
|
secondaryIcon: "cib:wireguard",
|
2444
|
-
secondaryIconColor: "#88171a"
|
3003
|
+
secondaryIconColor: "#88171a",
|
3004
|
+
category: "VPN"
|
2445
3005
|
},
|
2446
3006
|
source: {
|
2447
3007
|
package: "@highstate/mullvad",
|
@@ -2456,18 +3016,18 @@ __export(timeweb_exports, {
|
|
2456
3016
|
connectionEntity: () => connectionEntity,
|
2457
3017
|
virtualMachine: () => virtualMachine2
|
2458
3018
|
});
|
2459
|
-
import { defineEntity as
|
2460
|
-
var connectionEntity =
|
3019
|
+
import { defineEntity as defineEntity13, defineUnit as defineUnit25, Type as Type26 } from "@highstate/contract";
|
3020
|
+
var connectionEntity = defineEntity13({
|
2461
3021
|
type: "timeweb.connection",
|
2462
|
-
schema:
|
2463
|
-
name:
|
2464
|
-
apiToken:
|
3022
|
+
schema: Type26.Object({
|
3023
|
+
name: Type26.String(),
|
3024
|
+
apiToken: Type26.String()
|
2465
3025
|
})
|
2466
3026
|
});
|
2467
|
-
var connection3 =
|
3027
|
+
var connection3 = defineUnit25({
|
2468
3028
|
type: "timeweb.connection",
|
2469
3029
|
secrets: {
|
2470
|
-
apiToken:
|
3030
|
+
apiToken: Type26.String()
|
2471
3031
|
},
|
2472
3032
|
outputs: {
|
2473
3033
|
connection: connectionEntity
|
@@ -2475,19 +3035,20 @@ var connection3 = defineUnit23({
|
|
2475
3035
|
meta: {
|
2476
3036
|
displayName: "Timeweb Connection",
|
2477
3037
|
description: "Creates a new Timeweb connection.",
|
2478
|
-
primaryIcon: "material-symbols:cloud"
|
3038
|
+
primaryIcon: "material-symbols:cloud",
|
3039
|
+
category: "Timeweb"
|
2479
3040
|
},
|
2480
3041
|
source: {
|
2481
3042
|
package: "@highstate/timeweb",
|
2482
3043
|
path: "connection"
|
2483
3044
|
}
|
2484
3045
|
});
|
2485
|
-
var virtualMachine2 =
|
3046
|
+
var virtualMachine2 = defineUnit25({
|
2486
3047
|
type: "timeweb.virtual-machine",
|
2487
3048
|
args: {
|
2488
|
-
presetId:
|
2489
|
-
osId:
|
2490
|
-
availabilityZone:
|
3049
|
+
presetId: Type26.Optional(Type26.Number()),
|
3050
|
+
osId: Type26.Optional(Type26.Number()),
|
3051
|
+
availabilityZone: Type26.String()
|
2491
3052
|
},
|
2492
3053
|
inputs: {
|
2493
3054
|
connection: connectionEntity,
|
@@ -2497,7 +3058,7 @@ var virtualMachine2 = defineUnit23({
|
|
2497
3058
|
}
|
2498
3059
|
},
|
2499
3060
|
secrets: {
|
2500
|
-
sshPrivateKey:
|
3061
|
+
sshPrivateKey: Type26.Optional(Type26.String())
|
2501
3062
|
},
|
2502
3063
|
outputs: {
|
2503
3064
|
server: serverEntity
|
@@ -2506,7 +3067,8 @@ var virtualMachine2 = defineUnit23({
|
|
2506
3067
|
displayName: "Timeweb Virtual Machine",
|
2507
3068
|
description: "Creates a new Timeweb virtual machine.",
|
2508
3069
|
primaryIcon: "material-symbols:cloud",
|
2509
|
-
secondaryIcon: "codicon:vm"
|
3070
|
+
secondaryIcon: "codicon:vm",
|
3071
|
+
category: "Timeweb"
|
2510
3072
|
},
|
2511
3073
|
source: {
|
2512
3074
|
package: "@highstate/timeweb",
|
@@ -2524,11 +3086,11 @@ __export(nixos_exports, {
|
|
2524
3086
|
remoteFlake: () => remoteFlake,
|
2525
3087
|
system: () => system
|
2526
3088
|
});
|
2527
|
-
import { defineEntity as
|
2528
|
-
var inlineModuleEntity =
|
3089
|
+
import { defineEntity as defineEntity14, defineUnit as defineUnit26, Type as Type27 } from "@highstate/contract";
|
3090
|
+
var inlineModuleEntity = defineEntity14({
|
2529
3091
|
type: "nixos.inline-module",
|
2530
|
-
schema:
|
2531
|
-
code:
|
3092
|
+
schema: Type27.Object({
|
3093
|
+
code: Type27.String()
|
2532
3094
|
}),
|
2533
3095
|
meta: {
|
2534
3096
|
displayName: "NixOS Inline Module",
|
@@ -2536,10 +3098,10 @@ var inlineModuleEntity = defineEntity13({
|
|
2536
3098
|
color: "#5277c3"
|
2537
3099
|
}
|
2538
3100
|
});
|
2539
|
-
var inlineModule =
|
3101
|
+
var inlineModule = defineUnit26({
|
2540
3102
|
type: "nixos.inline-module",
|
2541
3103
|
args: {
|
2542
|
-
code:
|
3104
|
+
code: Type27.String({ language: "nix" })
|
2543
3105
|
},
|
2544
3106
|
inputs: {
|
2545
3107
|
files: {
|
@@ -2556,17 +3118,18 @@ var inlineModule = defineUnit24({
|
|
2556
3118
|
description: "Creates a NixOS module from inline code.",
|
2557
3119
|
primaryIcon: "simple-icons:nixos",
|
2558
3120
|
primaryIconColor: "#7ebae4",
|
2559
|
-
secondaryIcon: "mdi:file-code"
|
3121
|
+
secondaryIcon: "mdi:file-code",
|
3122
|
+
category: "NixOS"
|
2560
3123
|
},
|
2561
3124
|
source: {
|
2562
3125
|
package: "@highstate/nixos",
|
2563
3126
|
path: "inline-module"
|
2564
3127
|
}
|
2565
3128
|
});
|
2566
|
-
var flakeEntity =
|
3129
|
+
var flakeEntity = defineEntity14({
|
2567
3130
|
type: "nixos.flake",
|
2568
|
-
schema:
|
2569
|
-
url:
|
3131
|
+
schema: Type27.Object({
|
3132
|
+
url: Type27.String()
|
2570
3133
|
}),
|
2571
3134
|
meta: {
|
2572
3135
|
displayName: "NixOS Flake",
|
@@ -2574,10 +3137,10 @@ var flakeEntity = defineEntity13({
|
|
2574
3137
|
color: "#5277c3"
|
2575
3138
|
}
|
2576
3139
|
});
|
2577
|
-
var remoteFlake =
|
3140
|
+
var remoteFlake = defineUnit26({
|
2578
3141
|
type: "nixos.remote-flake",
|
2579
3142
|
args: {
|
2580
|
-
url:
|
3143
|
+
url: Type27.String()
|
2581
3144
|
},
|
2582
3145
|
outputs: {
|
2583
3146
|
flake: flakeEntity
|
@@ -2588,17 +3151,18 @@ var remoteFlake = defineUnit24({
|
|
2588
3151
|
primaryIcon: "simple-icons:nixos",
|
2589
3152
|
primaryIconColor: "#7ebae4",
|
2590
3153
|
secondaryIcon: "simple-icons:git",
|
2591
|
-
secondaryIconColor: "#f1502f"
|
3154
|
+
secondaryIconColor: "#f1502f",
|
3155
|
+
category: "NixOS"
|
2592
3156
|
},
|
2593
3157
|
source: {
|
2594
3158
|
package: "@highstate/nixos",
|
2595
3159
|
path: "flake"
|
2596
3160
|
}
|
2597
3161
|
});
|
2598
|
-
var inlineFlake =
|
3162
|
+
var inlineFlake = defineUnit26({
|
2599
3163
|
type: "nixos.inline-flake",
|
2600
3164
|
args: {
|
2601
|
-
code:
|
3165
|
+
code: Type27.String({ language: "nix" })
|
2602
3166
|
},
|
2603
3167
|
inputs: {
|
2604
3168
|
flakes: {
|
@@ -2625,17 +3189,18 @@ var inlineFlake = defineUnit24({
|
|
2625
3189
|
description: "Creates a NixOS flake from inline code.",
|
2626
3190
|
primaryIcon: "simple-icons:nixos",
|
2627
3191
|
primaryIconColor: "#7ebae4",
|
2628
|
-
secondaryIcon: "mdi:file-code"
|
3192
|
+
secondaryIcon: "mdi:file-code",
|
3193
|
+
category: "NixOS"
|
2629
3194
|
},
|
2630
3195
|
source: {
|
2631
3196
|
package: "@highstate/nixos",
|
2632
3197
|
path: "inline-flake"
|
2633
3198
|
}
|
2634
3199
|
});
|
2635
|
-
var system =
|
3200
|
+
var system = defineUnit26({
|
2636
3201
|
type: "nixos.system",
|
2637
3202
|
args: {
|
2638
|
-
system:
|
3203
|
+
system: Type27.Optional(Type27.String())
|
2639
3204
|
},
|
2640
3205
|
inputs: {
|
2641
3206
|
flake: flakeEntity,
|
@@ -2654,7 +3219,8 @@ var system = defineUnit24({
|
|
2654
3219
|
description: "Creates a NixOS system on top of any server.",
|
2655
3220
|
primaryIcon: "simple-icons:nixos",
|
2656
3221
|
primaryIconColor: "#7ebae4",
|
2657
|
-
secondaryIcon: "codicon:vm"
|
3222
|
+
secondaryIcon: "codicon:vm",
|
3223
|
+
category: "NixOS"
|
2658
3224
|
},
|
2659
3225
|
source: {
|
2660
3226
|
package: "@highstate/nixos",
|
@@ -2667,11 +3233,11 @@ var sops_exports = {};
|
|
2667
3233
|
__export(sops_exports, {
|
2668
3234
|
secrets: () => secrets
|
2669
3235
|
});
|
2670
|
-
import { defineUnit as
|
2671
|
-
var secrets =
|
3236
|
+
import { defineUnit as defineUnit27, Type as Type28 } from "@highstate/contract";
|
3237
|
+
var secrets = defineUnit27({
|
2672
3238
|
type: "sops.secrets",
|
2673
3239
|
args: {
|
2674
|
-
secrets:
|
3240
|
+
secrets: Type28.Record(Type28.String(), Type28.Any())
|
2675
3241
|
},
|
2676
3242
|
inputs: {
|
2677
3243
|
servers: {
|
@@ -2686,7 +3252,8 @@ var secrets = defineUnit25({
|
|
2686
3252
|
meta: {
|
2687
3253
|
displayName: "SOPS Secrets",
|
2688
3254
|
description: "Encrypts secrets using SOPS for the specified servers.",
|
2689
|
-
primaryIcon: "mdi:file-lock"
|
3255
|
+
primaryIcon: "mdi:file-lock",
|
3256
|
+
category: "Secrets"
|
2690
3257
|
},
|
2691
3258
|
source: {
|
2692
3259
|
package: "@highstate/sops",
|
@@ -2697,21 +3264,21 @@ var secrets = defineUnit25({
|
|
2697
3264
|
// src/obfuscators/index.ts
|
2698
3265
|
var obfuscators_exports = {};
|
2699
3266
|
__export(obfuscators_exports, {
|
3267
|
+
deobfuscatorSpec: () => deobfuscatorSpec,
|
3268
|
+
obfuscatorSpec: () => obfuscatorSpec,
|
2700
3269
|
phantun: () => phantun_exports
|
2701
3270
|
});
|
2702
3271
|
|
2703
|
-
// src/obfuscators/phantun.ts
|
2704
|
-
var phantun_exports = {};
|
2705
|
-
__export(phantun_exports, {
|
2706
|
-
deobfuscator: () => deobfuscator,
|
2707
|
-
obfuscator: () => obfuscator
|
2708
|
-
});
|
2709
|
-
import { defineUnit as defineUnit26 } from "@highstate/contract";
|
2710
|
-
|
2711
3272
|
// src/obfuscators/shared.ts
|
2712
|
-
import { Type as
|
3273
|
+
import { Type as Type29 } from "@highstate/contract";
|
2713
3274
|
var deobfuscatorSpec = {
|
2714
3275
|
args: {
|
3276
|
+
/**
|
3277
|
+
* The name of the namespace and deployment to deploy the deobfuscator on.
|
3278
|
+
*
|
3279
|
+
* By default, calculated as `deobfs-{type}-{name}`.
|
3280
|
+
*/
|
3281
|
+
appName: Type29.Optional(Type29.String()),
|
2715
3282
|
/**
|
2716
3283
|
* The L4 endpoint to forward deobfuscated traffic to.
|
2717
3284
|
*
|
@@ -2719,11 +3286,24 @@ var deobfuscatorSpec = {
|
|
2719
3286
|
*
|
2720
3287
|
* @schema
|
2721
3288
|
*/
|
2722
|
-
|
2723
|
-
...
|
3289
|
+
targetEndpoints: {
|
3290
|
+
...Type29.Default(Type29.Array(Type29.String()), []),
|
2724
3291
|
description: `The L4 endpoint to forward deobfuscated traffic to.
|
2725
3292
|
|
2726
3293
|
Will take precedence over the \`targetEndpoint\` input.`
|
3294
|
+
},
|
3295
|
+
/**
|
3296
|
+
* Whether to expose the deobfuscator service by "NodePort" or "LoadBalancer".
|
3297
|
+
*
|
3298
|
+
* By default, the service is not exposed and only accessible from within the cluster.
|
3299
|
+
*
|
3300
|
+
* @schema
|
3301
|
+
*/
|
3302
|
+
external: {
|
3303
|
+
...Type29.Default(Type29.Boolean(), false),
|
3304
|
+
description: `Whether to expose the deobfuscator service by "NodePort" or "LoadBalancer".
|
3305
|
+
|
3306
|
+
By default, the service is not exposed and only accessible from within the cluster.`
|
2727
3307
|
}
|
2728
3308
|
},
|
2729
3309
|
inputs: {
|
@@ -2737,41 +3317,72 @@ var deobfuscatorSpec = {
|
|
2737
3317
|
description: `The Kubernetes cluster to deploy the deobfuscator on.`
|
2738
3318
|
},
|
2739
3319
|
/**
|
2740
|
-
* The L4
|
3320
|
+
* The L4 endpoints to forward deobfuscated traffic to.
|
3321
|
+
*
|
3322
|
+
* Will select the most appropriate endpoint based on the environment.
|
2741
3323
|
*
|
2742
3324
|
* @schema
|
2743
3325
|
*/
|
2744
|
-
|
2745
|
-
...
|
2746
|
-
|
3326
|
+
targetEndpoints: {
|
3327
|
+
...{
|
3328
|
+
entity: l4EndpointEntity,
|
3329
|
+
required: false,
|
3330
|
+
multiple: true
|
3331
|
+
},
|
3332
|
+
description: `The L4 endpoints to forward deobfuscated traffic to.
|
3333
|
+
|
3334
|
+
Will select the most appropriate endpoint based on the environment.`
|
2747
3335
|
}
|
2748
3336
|
},
|
2749
3337
|
outputs: {
|
2750
3338
|
/**
|
2751
|
-
* The L4
|
3339
|
+
* The L4 endpoints of the deobfuscator accepting obfuscated traffic.
|
2752
3340
|
*
|
2753
3341
|
* @schema
|
2754
3342
|
*/
|
2755
|
-
|
2756
|
-
...
|
2757
|
-
|
3343
|
+
endpoints: {
|
3344
|
+
...{
|
3345
|
+
entity: l4EndpointEntity,
|
3346
|
+
required: false,
|
3347
|
+
multiple: true
|
3348
|
+
},
|
3349
|
+
description: `The L4 endpoints of the deobfuscator accepting obfuscated traffic.`
|
2758
3350
|
}
|
2759
3351
|
}
|
2760
3352
|
};
|
2761
3353
|
var obfuscatorSpec = {
|
2762
3354
|
args: {
|
3355
|
+
/**
|
3356
|
+
* The name of the namespace and deployment to deploy the obfuscator on.
|
3357
|
+
*
|
3358
|
+
* By default, calculated as `obfs-{type}-{name}`.
|
3359
|
+
*/
|
3360
|
+
appName: Type29.Optional(Type29.String()),
|
2763
3361
|
/**
|
2764
3362
|
* The endpoint of the deobfuscator to pass obfuscated traffic to.
|
2765
3363
|
*
|
2766
|
-
* Will take precedence over the `
|
3364
|
+
* Will take precedence over the `endpoint` input.
|
2767
3365
|
*
|
2768
3366
|
* @schema
|
2769
3367
|
*/
|
2770
|
-
|
2771
|
-
...
|
3368
|
+
endpoints: {
|
3369
|
+
...Type29.Default(Type29.Array(Type29.String()), []),
|
2772
3370
|
description: `The endpoint of the deobfuscator to pass obfuscated traffic to.
|
2773
3371
|
|
2774
|
-
Will take precedence over the \`
|
3372
|
+
Will take precedence over the \`endpoint\` input.`
|
3373
|
+
},
|
3374
|
+
/**
|
3375
|
+
* Whether to expose the obfuscator service by "NodePort" or "LoadBalancer".
|
3376
|
+
*
|
3377
|
+
* By default, the service is not exposed and only accessible from within the cluster.
|
3378
|
+
*
|
3379
|
+
* @schema
|
3380
|
+
*/
|
3381
|
+
external: {
|
3382
|
+
...Type29.Default(Type29.Boolean(), false),
|
3383
|
+
description: `Whether to expose the obfuscator service by "NodePort" or "LoadBalancer".
|
3384
|
+
|
3385
|
+
By default, the service is not exposed and only accessible from within the cluster.`
|
2775
3386
|
}
|
2776
3387
|
},
|
2777
3388
|
inputs: {
|
@@ -2785,54 +3396,70 @@ var obfuscatorSpec = {
|
|
2785
3396
|
description: `The Kubernetes cluster to deploy the obfuscator on.`
|
2786
3397
|
},
|
2787
3398
|
/**
|
2788
|
-
* The L4
|
3399
|
+
* The L4 endpoints of the deobfuscator to pass obfuscated traffic to.
|
3400
|
+
*
|
3401
|
+
* Will select the most appropriate endpoint based on the environment.
|
2789
3402
|
*
|
2790
3403
|
* @schema
|
2791
3404
|
*/
|
2792
|
-
|
3405
|
+
endpoints: {
|
2793
3406
|
...{
|
2794
3407
|
entity: l4EndpointEntity,
|
2795
|
-
required: false
|
3408
|
+
required: false,
|
3409
|
+
multiple: true
|
2796
3410
|
},
|
2797
|
-
description: `The L4
|
3411
|
+
description: `The L4 endpoints of the deobfuscator to pass obfuscated traffic to.
|
3412
|
+
|
3413
|
+
Will select the most appropriate endpoint based on the environment.`
|
2798
3414
|
}
|
2799
3415
|
},
|
2800
3416
|
outputs: {
|
2801
3417
|
/**
|
2802
|
-
* The L4
|
3418
|
+
* The L4 endpoints accepting unobfuscated traffic.
|
2803
3419
|
*
|
2804
3420
|
* @schema
|
2805
3421
|
*/
|
2806
|
-
|
2807
|
-
...
|
2808
|
-
|
3422
|
+
entryEndpoints: {
|
3423
|
+
...{
|
3424
|
+
entity: l4EndpointEntity,
|
3425
|
+
multiple: true
|
3426
|
+
},
|
3427
|
+
description: `The L4 endpoints accepting unobfuscated traffic.`
|
2809
3428
|
}
|
2810
3429
|
}
|
2811
3430
|
};
|
2812
3431
|
|
2813
3432
|
// src/obfuscators/phantun.ts
|
2814
|
-
var
|
3433
|
+
var phantun_exports = {};
|
3434
|
+
__export(phantun_exports, {
|
3435
|
+
deobfuscator: () => deobfuscator,
|
3436
|
+
obfuscator: () => obfuscator
|
3437
|
+
});
|
3438
|
+
import { defineUnit as defineUnit28 } from "@highstate/contract";
|
3439
|
+
var deobfuscator = defineUnit28({
|
2815
3440
|
type: "obfuscators.phantun.deobfuscator",
|
2816
3441
|
...deobfuscatorSpec,
|
2817
3442
|
meta: {
|
2818
3443
|
displayName: "Phantun Deobfuscator",
|
2819
3444
|
description: "The Phantun Deobfuscator deployed on Kubernetes.",
|
2820
3445
|
primaryIcon: "mdi:network-outline",
|
2821
|
-
secondaryIcon: "mdi:hide"
|
3446
|
+
secondaryIcon: "mdi:hide",
|
3447
|
+
category: "Obfuscators"
|
2822
3448
|
},
|
2823
3449
|
source: {
|
2824
3450
|
package: "@highstate/obfuscators",
|
2825
3451
|
path: "phantun/deobfuscator"
|
2826
3452
|
}
|
2827
3453
|
});
|
2828
|
-
var obfuscator =
|
3454
|
+
var obfuscator = defineUnit28({
|
2829
3455
|
type: "obfuscators.phantun.obfuscator",
|
2830
3456
|
...obfuscatorSpec,
|
2831
3457
|
meta: {
|
2832
3458
|
displayName: "Phantun Obfuscator",
|
2833
3459
|
description: "The Phantun Obfuscator deployed on Kubernetes.",
|
2834
3460
|
primaryIcon: "mdi:network-outline",
|
2835
|
-
secondaryIcon: "mdi:hide"
|
3461
|
+
secondaryIcon: "mdi:hide",
|
3462
|
+
category: "Obfuscators"
|
2836
3463
|
},
|
2837
3464
|
source: {
|
2838
3465
|
package: "@highstate/obfuscators",
|
@@ -2841,14 +3468,17 @@ var obfuscator = defineUnit26({
|
|
2841
3468
|
});
|
2842
3469
|
export {
|
2843
3470
|
apps_exports as apps,
|
3471
|
+
arrayPatchModeSchema,
|
2844
3472
|
cloudflare_exports as cloudflare,
|
2845
3473
|
common_exports as common,
|
2846
3474
|
dns_exports as dns,
|
2847
3475
|
k3s_exports as k3s,
|
2848
3476
|
k8s_exports as k8s,
|
2849
3477
|
mullvad_exports as mullvad,
|
3478
|
+
network_exports as network,
|
2850
3479
|
nixos_exports as nixos,
|
2851
3480
|
obfuscators_exports as obfuscators,
|
3481
|
+
prefixKeysWith,
|
2852
3482
|
proxmox_exports as proxmox,
|
2853
3483
|
restic_exports as restic,
|
2854
3484
|
sops_exports as sops,
|