@highstate/library 0.6.2 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1999 -164
- package/dist/index.mjs +521 -49
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
@@ -271,6 +271,9 @@ const virtualMachine = defineUnit({
|
|
271
271
|
required: false
|
272
272
|
}
|
273
273
|
},
|
274
|
+
secrets: {
|
275
|
+
sshPassword: Type.Optional(Type.String())
|
276
|
+
},
|
274
277
|
outputs: {
|
275
278
|
server: serverEntity
|
276
279
|
},
|
@@ -299,12 +302,53 @@ var proxmox = /*#__PURE__*/Object.freeze({
|
|
299
302
|
virtualMachine: virtualMachine
|
300
303
|
});
|
301
304
|
|
305
|
+
const clusterInfoSchema = Type.Object({
|
306
|
+
id: Type.String(),
|
307
|
+
name: Type.String(),
|
308
|
+
cni: Type.Optional(Type.String())
|
309
|
+
});
|
310
|
+
const serviceTypeSchema = Type.Union([
|
311
|
+
Type.Literal("NodePort"),
|
312
|
+
Type.Literal("LoadBalancer"),
|
313
|
+
Type.Literal("ClusterIP")
|
314
|
+
]);
|
315
|
+
const metadataSchema = Type.Object({
|
316
|
+
namespace: Type.Optional(Type.String()),
|
317
|
+
name: Type.String(),
|
318
|
+
labels: Type.Optional(Type.Record(Type.String(), Type.String())),
|
319
|
+
annotations: Type.Optional(Type.Record(Type.String(), Type.String()))
|
320
|
+
});
|
321
|
+
const servicePortSchema = Type.Object({
|
322
|
+
name: Type.Optional(Type.String()),
|
323
|
+
port: Type.Optional(Type.Number()),
|
324
|
+
targetPort: Type.Optional(Type.Union([Type.Number(), Type.String()])),
|
325
|
+
protocol: Type.Optional(Type.String())
|
326
|
+
});
|
327
|
+
const serviceSpecSchema = Type.Object({
|
328
|
+
type: Type.Optional(Type.String()),
|
329
|
+
selector: Type.Record(Type.String(), Type.String()),
|
330
|
+
ports: Type.Array(servicePortSchema),
|
331
|
+
clusterIP: Type.Optional(Type.String()),
|
332
|
+
clusterIPs: Type.Optional(Type.Array(Type.String())),
|
333
|
+
externalIPs: Type.Optional(Type.Array(Type.String()))
|
334
|
+
});
|
335
|
+
const serviceEntity = defineEntity({
|
336
|
+
type: "k8s.service",
|
337
|
+
schema: Type.Object({
|
338
|
+
type: Type.Literal("k8s.service"),
|
339
|
+
clusterInfo: clusterInfoSchema,
|
340
|
+
metadata: metadataSchema,
|
341
|
+
spec: serviceSpecSchema
|
342
|
+
}),
|
343
|
+
meta: {
|
344
|
+
color: "#2196F3"
|
345
|
+
}
|
346
|
+
});
|
302
347
|
const clusterEntity$1 = defineEntity({
|
303
348
|
type: "k8s.cluster",
|
304
349
|
schema: Type.Object({
|
305
|
-
|
306
|
-
kubeconfig: Type.String()
|
307
|
-
cni: Type.String()
|
350
|
+
info: clusterInfoSchema,
|
351
|
+
kubeconfig: Type.String()
|
308
352
|
}),
|
309
353
|
meta: {
|
310
354
|
color: "#2196F3"
|
@@ -332,11 +376,12 @@ const existingCluster = defineUnit({
|
|
332
376
|
const gatewayEntity = defineEntity({
|
333
377
|
type: "k8s.gateway",
|
334
378
|
schema: Type.Object({
|
335
|
-
|
379
|
+
clusterInfo: clusterInfoSchema,
|
336
380
|
gatewayClassName: Type.String(),
|
337
381
|
httpListenerPort: Type.Number(),
|
338
382
|
httpsListenerPort: Type.Number(),
|
339
|
-
ip: Type.String()
|
383
|
+
ip: Type.String(),
|
384
|
+
service: Type.Optional(serviceEntity.schema)
|
340
385
|
}),
|
341
386
|
meta: {
|
342
387
|
color: "#4CAF50"
|
@@ -345,7 +390,7 @@ const gatewayEntity = defineEntity({
|
|
345
390
|
const tlsIssuerEntity = defineEntity({
|
346
391
|
type: "k8s.tls-issuer",
|
347
392
|
schema: Type.Object({
|
348
|
-
|
393
|
+
clusterInfo: clusterInfoSchema,
|
349
394
|
clusterIssuerName: Type.String()
|
350
395
|
}),
|
351
396
|
meta: {
|
@@ -423,24 +468,56 @@ const dns01TlsIssuer = defineUnit({
|
|
423
468
|
path: "dns01-issuer"
|
424
469
|
}
|
425
470
|
});
|
426
|
-
const
|
427
|
-
Type.
|
428
|
-
Type.
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
471
|
+
const containerSchema = Type.Object({
|
472
|
+
name: Type.String(),
|
473
|
+
image: Type.String()
|
474
|
+
});
|
475
|
+
const labelSelectorSchema = Type.Object({
|
476
|
+
matchLabels: Type.Record(Type.String(), Type.String())
|
477
|
+
});
|
478
|
+
const deploymentSpecSchema = Type.Object({
|
479
|
+
replicas: Type.Number(),
|
480
|
+
selector: labelSelectorSchema,
|
481
|
+
template: Type.Object({
|
482
|
+
metadata: metadataSchema,
|
483
|
+
spec: Type.Object({
|
484
|
+
containers: Type.Array(containerSchema)
|
485
|
+
})
|
486
|
+
})
|
487
|
+
});
|
488
|
+
const deploymentEntity = defineEntity({
|
489
|
+
type: "k8s.deployment",
|
433
490
|
schema: Type.Object({
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
serviceType: serviceTypeSchema,
|
439
|
-
ip: Type.Optional(Type.String()),
|
440
|
-
ports: Type.Array(Type.Number())
|
491
|
+
type: Type.Literal("k8s.deployment"),
|
492
|
+
clusterInfo: clusterInfoSchema,
|
493
|
+
metadata: metadataSchema,
|
494
|
+
service: Type.Optional(serviceEntity.schema)
|
441
495
|
}),
|
442
496
|
meta: {
|
443
|
-
color: "#
|
497
|
+
color: "#4CAF50"
|
498
|
+
}
|
499
|
+
});
|
500
|
+
const statefulSetEntity = defineEntity({
|
501
|
+
type: "k8s.stateful-set",
|
502
|
+
schema: Type.Object({
|
503
|
+
type: Type.Literal("k8s.stateful-set"),
|
504
|
+
clusterInfo: clusterInfoSchema,
|
505
|
+
metadata: metadataSchema,
|
506
|
+
service: Type.Optional(serviceEntity.schema)
|
507
|
+
}),
|
508
|
+
meta: {
|
509
|
+
color: "#FFC107"
|
510
|
+
}
|
511
|
+
});
|
512
|
+
const persistentVolumeClaimEntity = defineEntity({
|
513
|
+
type: "k8s.persistent-volume-claim",
|
514
|
+
schema: Type.Object({
|
515
|
+
type: Type.Literal("k8s.persistent-volume-claim"),
|
516
|
+
clusterInfo: clusterInfoSchema,
|
517
|
+
metadata: metadataSchema
|
518
|
+
}),
|
519
|
+
meta: {
|
520
|
+
color: "#FFC107"
|
444
521
|
}
|
445
522
|
});
|
446
523
|
|
@@ -450,11 +527,21 @@ var k8s = /*#__PURE__*/Object.freeze({
|
|
450
527
|
accessPointEntity: accessPointEntity,
|
451
528
|
certManager: certManager,
|
452
529
|
clusterEntity: clusterEntity$1,
|
530
|
+
clusterInfoSchema: clusterInfoSchema,
|
531
|
+
containerSchema: containerSchema,
|
532
|
+
deploymentEntity: deploymentEntity,
|
533
|
+
deploymentSpecSchema: deploymentSpecSchema,
|
453
534
|
dns01TlsIssuer: dns01TlsIssuer,
|
454
535
|
existingCluster: existingCluster,
|
455
536
|
gatewayEntity: gatewayEntity,
|
537
|
+
labelSelectorSchema: labelSelectorSchema,
|
538
|
+
metadataSchema: metadataSchema,
|
539
|
+
persistentVolumeClaimEntity: persistentVolumeClaimEntity,
|
456
540
|
serviceEntity: serviceEntity,
|
541
|
+
servicePortSchema: servicePortSchema,
|
542
|
+
serviceSpecSchema: serviceSpecSchema,
|
457
543
|
serviceTypeSchema: serviceTypeSchema,
|
544
|
+
statefulSetEntity: statefulSetEntity,
|
458
545
|
tlsIssuerEntity: tlsIssuerEntity
|
459
546
|
});
|
460
547
|
|
@@ -604,13 +691,14 @@ const identityEntity = defineEntity({
|
|
604
691
|
schema: Type.Object({
|
605
692
|
name: Type.String(),
|
606
693
|
network: Type.Optional(networkEntity.schema),
|
607
|
-
address: Type.String(),
|
694
|
+
address: Type.Optional(Type.String()),
|
608
695
|
privateKey: Type.String(),
|
609
696
|
presharedKeyPart: Type.Optional(Type.String()),
|
610
697
|
k8sServices: Type.Array(serviceEntity.schema),
|
611
698
|
exitNode: Type.Boolean(),
|
612
699
|
listenPort: Type.Optional(Type.Number()),
|
613
|
-
externalIp: Type.Optional(Type.String())
|
700
|
+
externalIp: Type.Optional(Type.String()),
|
701
|
+
endpoint: Type.Optional(Type.String())
|
614
702
|
}),
|
615
703
|
meta: {
|
616
704
|
color: "#F44336"
|
@@ -622,7 +710,7 @@ const peerEntity = defineEntity({
|
|
622
710
|
name: Type.String(),
|
623
711
|
network: Type.Optional(networkEntity.schema),
|
624
712
|
publicKey: Type.String(),
|
625
|
-
address: Type.String(),
|
713
|
+
address: Type.Optional(Type.String()),
|
626
714
|
allowedIps: Type.Array(Type.String()),
|
627
715
|
endpoint: Type.Optional(Type.String()),
|
628
716
|
presharedKeyPart: Type.Optional(Type.String())
|
@@ -706,7 +794,7 @@ const identity = defineUnit({
|
|
706
794
|
*
|
707
795
|
* The address may be any IPv4 or IPv6 address. CIDR notation is also supported.
|
708
796
|
*/
|
709
|
-
address: Type.String(),
|
797
|
+
address: Type.Optional(Type.String()),
|
710
798
|
/**
|
711
799
|
* The list of allowed IPs for the peer.
|
712
800
|
*
|
@@ -793,21 +881,101 @@ const identity = defineUnit({
|
|
793
881
|
path: "identity"
|
794
882
|
}
|
795
883
|
});
|
884
|
+
const peer$1 = defineUnit({
|
885
|
+
type: "wireguard.peer",
|
886
|
+
args: {
|
887
|
+
/**
|
888
|
+
* The name of the WireGuard peer.
|
889
|
+
*
|
890
|
+
* If not provided, the peer will be named after the unit.
|
891
|
+
*/
|
892
|
+
peerName: Type.Optional(Type.String()),
|
893
|
+
/**
|
894
|
+
* The address of the WireGuard interface.
|
895
|
+
*
|
896
|
+
* The address may be any IPv4 or IPv6 address. CIDR notation is also supported.
|
897
|
+
*/
|
898
|
+
address: Type.Optional(Type.String()),
|
899
|
+
/**
|
900
|
+
* The list of allowed IPs for the peer.
|
901
|
+
*
|
902
|
+
* Does not affect node which implements the peer, but is used in the peer configuration of other nodes.
|
903
|
+
*/
|
904
|
+
allowedIps: Type.Optional(Type.Array(Type.String())),
|
905
|
+
/**
|
906
|
+
* The endpoint of the WireGuard peer.
|
907
|
+
*
|
908
|
+
* By default, the endpoint is calculated as `externalIp:listenPort`.
|
909
|
+
*
|
910
|
+
* If overridden, does not affect node which implements the peer, but is used in the peer configuration of other nodes.
|
911
|
+
*/
|
912
|
+
endpoint: Type.Optional(Type.String()),
|
913
|
+
/**
|
914
|
+
* The public key of the WireGuard peer.
|
915
|
+
*/
|
916
|
+
publicKey: Type.String()
|
917
|
+
},
|
918
|
+
inputs: {
|
919
|
+
/**
|
920
|
+
* The network to use for the WireGuard peer.
|
921
|
+
*
|
922
|
+
* If not provided, the peer will use default network configuration.
|
923
|
+
*/
|
924
|
+
network: {
|
925
|
+
entity: networkEntity,
|
926
|
+
required: false
|
927
|
+
}
|
928
|
+
},
|
929
|
+
outputs: {
|
930
|
+
peer: peerEntity
|
931
|
+
},
|
932
|
+
meta: {
|
933
|
+
description: "The WireGuard peer with the public key.",
|
934
|
+
primaryIcon: "simple-icons:wireguard",
|
935
|
+
primaryIconColor: "#88171a",
|
936
|
+
secondaryIcon: "mdi:badge-account-horizontal"
|
937
|
+
},
|
938
|
+
source: {
|
939
|
+
type: "npm",
|
940
|
+
package: "@highstate/wireguard",
|
941
|
+
path: "peer"
|
942
|
+
}
|
943
|
+
});
|
796
944
|
const node = defineUnit({
|
797
945
|
type: "wireguard.node",
|
798
946
|
args: {
|
799
947
|
appName: Type.Optional(Type.String()),
|
800
|
-
serviceType: Type.Optional(serviceTypeSchema)
|
948
|
+
serviceType: Type.Optional(serviceTypeSchema),
|
949
|
+
prototype: Type.Optional(Type.Boolean()),
|
950
|
+
dns: Type.Optional(Type.Array(Type.String()))
|
801
951
|
},
|
802
952
|
inputs: {
|
803
953
|
identity: identityEntity,
|
804
954
|
k8sCluster: clusterEntity$1,
|
955
|
+
deployment: {
|
956
|
+
entity: deploymentEntity,
|
957
|
+
required: false
|
958
|
+
},
|
959
|
+
statefulSet: {
|
960
|
+
entity: statefulSetEntity,
|
961
|
+
required: false
|
962
|
+
},
|
805
963
|
peers: {
|
806
964
|
entity: peerEntity,
|
807
965
|
multiple: true,
|
808
966
|
required: false
|
809
967
|
}
|
810
968
|
},
|
969
|
+
outputs: {
|
970
|
+
deployment: {
|
971
|
+
entity: deploymentEntity,
|
972
|
+
required: false
|
973
|
+
},
|
974
|
+
service: {
|
975
|
+
entity: serviceEntity,
|
976
|
+
required: false
|
977
|
+
}
|
978
|
+
},
|
811
979
|
meta: {
|
812
980
|
description: "The WireGuard node running on the Kubernetes.",
|
813
981
|
primaryIcon: "simple-icons:wireguard",
|
@@ -903,6 +1071,7 @@ var wireguard = /*#__PURE__*/Object.freeze({
|
|
903
1071
|
network: network,
|
904
1072
|
networkEntity: networkEntity,
|
905
1073
|
node: node,
|
1074
|
+
peer: peer$1,
|
906
1075
|
peerEntity: peerEntity,
|
907
1076
|
presharedKeyModeSchema: presharedKeyModeSchema
|
908
1077
|
});
|
@@ -954,15 +1123,12 @@ var restic = /*#__PURE__*/Object.freeze({
|
|
954
1123
|
});
|
955
1124
|
|
956
1125
|
const mariadbEntity = defineEntity({
|
957
|
-
type: "mariadb",
|
1126
|
+
type: "apps.mariadb",
|
958
1127
|
schema: Type.Object({
|
1128
|
+
service: Type.Optional(serviceEntity.schema),
|
959
1129
|
host: Type.String(),
|
960
1130
|
port: Type.Number(),
|
961
|
-
rootPassword: Type.String()
|
962
|
-
clusterName: Type.Optional(Type.String()),
|
963
|
-
clusterHost: Type.String(),
|
964
|
-
clusterIp: Type.String(),
|
965
|
-
fqdn: Type.Optional(Type.String())
|
1131
|
+
rootPassword: Type.String()
|
966
1132
|
}),
|
967
1133
|
meta: {
|
968
1134
|
color: "#f06292"
|
@@ -1000,21 +1166,43 @@ const mariadb = defineUnit({
|
|
1000
1166
|
},
|
1001
1167
|
source: {
|
1002
1168
|
type: "npm",
|
1003
|
-
package: "@highstate/
|
1004
|
-
path: "app"
|
1169
|
+
package: "@highstate/apps",
|
1170
|
+
path: "mariadb/app"
|
1171
|
+
}
|
1172
|
+
});
|
1173
|
+
const mariadbDatabase = defineUnit({
|
1174
|
+
type: "apps.mariadb.database",
|
1175
|
+
args: {
|
1176
|
+
database: Type.Optional(Type.String()),
|
1177
|
+
username: Type.Optional(Type.String())
|
1178
|
+
},
|
1179
|
+
secrets: {
|
1180
|
+
password: Type.Optional(Type.String())
|
1181
|
+
},
|
1182
|
+
inputs: {
|
1183
|
+
k8sCluster: clusterEntity$1,
|
1184
|
+
mariadb: mariadbEntity
|
1185
|
+
},
|
1186
|
+
meta: {
|
1187
|
+
displayName: "MariaDB Database",
|
1188
|
+
description: "The virtual MariaDB database created on the MariaDB instance. Works only for MariaDB instances deployed on Kubernetes.",
|
1189
|
+
primaryIcon: "simple-icons:mariadb",
|
1190
|
+
secondaryIcon: "mdi:database-plus"
|
1191
|
+
},
|
1192
|
+
source: {
|
1193
|
+
type: "npm",
|
1194
|
+
package: "@highstate/apps",
|
1195
|
+
path: "mariadb/database"
|
1005
1196
|
}
|
1006
1197
|
});
|
1007
1198
|
|
1008
1199
|
const postgresqlEntity = defineEntity({
|
1009
|
-
type: "postgresql",
|
1200
|
+
type: "apps.postgresql",
|
1010
1201
|
schema: Type.Object({
|
1202
|
+
service: Type.Optional(serviceEntity.schema),
|
1011
1203
|
host: Type.String(),
|
1012
1204
|
port: Type.Number(),
|
1013
|
-
rootPassword: Type.String()
|
1014
|
-
clusterName: Type.Optional(Type.String()),
|
1015
|
-
clusterHost: Type.String(),
|
1016
|
-
clusterIp: Type.String(),
|
1017
|
-
fqdn: Type.Optional(Type.String())
|
1205
|
+
rootPassword: Type.String()
|
1018
1206
|
}),
|
1019
1207
|
meta: {
|
1020
1208
|
color: "#336791"
|
@@ -1052,8 +1240,33 @@ const postgresql = defineUnit({
|
|
1052
1240
|
},
|
1053
1241
|
source: {
|
1054
1242
|
type: "npm",
|
1055
|
-
package: "@highstate/
|
1056
|
-
path: "app"
|
1243
|
+
package: "@highstate/apps",
|
1244
|
+
path: "postgresql/app"
|
1245
|
+
}
|
1246
|
+
});
|
1247
|
+
const postgresqlDatabase = defineUnit({
|
1248
|
+
type: "apps.postgresql.database",
|
1249
|
+
args: {
|
1250
|
+
database: Type.Optional(Type.String()),
|
1251
|
+
username: Type.Optional(Type.String())
|
1252
|
+
},
|
1253
|
+
secrets: {
|
1254
|
+
password: Type.Optional(Type.String())
|
1255
|
+
},
|
1256
|
+
inputs: {
|
1257
|
+
k8sCluster: clusterEntity$1,
|
1258
|
+
postgresql: postgresqlEntity
|
1259
|
+
},
|
1260
|
+
meta: {
|
1261
|
+
displayName: "PostgreSQL Database",
|
1262
|
+
description: "The virtual PostgreSQL database created on the PostgreSQL instance. Works only for PostgreSQL instances deployed on Kubernetes.",
|
1263
|
+
primaryIcon: "simple-icons:postgresql",
|
1264
|
+
secondaryIcon: "mdi:database-plus"
|
1265
|
+
},
|
1266
|
+
source: {
|
1267
|
+
type: "npm",
|
1268
|
+
package: "@highstate/apps",
|
1269
|
+
path: "postgresql/database"
|
1057
1270
|
}
|
1058
1271
|
});
|
1059
1272
|
|
@@ -1078,7 +1291,8 @@ const vaultwarden = defineUnit({
|
|
1078
1291
|
},
|
1079
1292
|
source: {
|
1080
1293
|
type: "npm",
|
1081
|
-
package: "@highstate/
|
1294
|
+
package: "@highstate/apps",
|
1295
|
+
path: "vaultwarden"
|
1082
1296
|
}
|
1083
1297
|
});
|
1084
1298
|
|
@@ -1103,8 +1317,8 @@ const traefikGateway = defineUnit({
|
|
1103
1317
|
},
|
1104
1318
|
source: {
|
1105
1319
|
type: "npm",
|
1106
|
-
package: "@highstate/
|
1107
|
-
path: "
|
1320
|
+
package: "@highstate/apps",
|
1321
|
+
path: "traefik"
|
1108
1322
|
}
|
1109
1323
|
});
|
1110
1324
|
|
@@ -1126,7 +1340,8 @@ const kubernetesDashboard = defineUnit({
|
|
1126
1340
|
},
|
1127
1341
|
source: {
|
1128
1342
|
type: "npm",
|
1129
|
-
package: "@highstate/
|
1343
|
+
package: "@highstate/apps",
|
1344
|
+
path: "kubernetes-dashboard"
|
1130
1345
|
}
|
1131
1346
|
});
|
1132
1347
|
|
@@ -1151,7 +1366,8 @@ const grocy = defineUnit({
|
|
1151
1366
|
},
|
1152
1367
|
source: {
|
1153
1368
|
type: "npm",
|
1154
|
-
package: "@highstate/
|
1369
|
+
package: "@highstate/apps",
|
1370
|
+
path: "grocy"
|
1155
1371
|
}
|
1156
1372
|
});
|
1157
1373
|
|
@@ -1181,19 +1397,241 @@ const maybe = defineUnit({
|
|
1181
1397
|
},
|
1182
1398
|
source: {
|
1183
1399
|
type: "npm",
|
1184
|
-
package: "@highstate/
|
1400
|
+
package: "@highstate/apps",
|
1401
|
+
path: "maybe"
|
1402
|
+
}
|
1403
|
+
});
|
1404
|
+
|
1405
|
+
const mongodbEntity = defineEntity({
|
1406
|
+
type: "apps.mongodb",
|
1407
|
+
schema: Type.Object({
|
1408
|
+
service: Type.Optional(serviceEntity.schema),
|
1409
|
+
host: Type.String(),
|
1410
|
+
port: Type.Number(),
|
1411
|
+
rootPassword: Type.String()
|
1412
|
+
}),
|
1413
|
+
meta: {
|
1414
|
+
color: "#13aa52"
|
1415
|
+
}
|
1416
|
+
});
|
1417
|
+
const mongodb = defineUnit({
|
1418
|
+
type: "apps.mongodb",
|
1419
|
+
args: {
|
1420
|
+
fqdn: Type.Optional(Type.String()),
|
1421
|
+
appName: Type.Optional(Type.String()),
|
1422
|
+
serviceType: Type.Optional(serviceTypeSchema)
|
1423
|
+
},
|
1424
|
+
secrets: {
|
1425
|
+
rootPassword: Type.Optional(Type.String())
|
1426
|
+
},
|
1427
|
+
inputs: {
|
1428
|
+
k8sCluster: clusterEntity$1,
|
1429
|
+
resticRepo: {
|
1430
|
+
entity: repoEntity,
|
1431
|
+
required: false
|
1432
|
+
},
|
1433
|
+
dnsProvider: {
|
1434
|
+
entity: dnsProviderEntity,
|
1435
|
+
required: false
|
1436
|
+
}
|
1437
|
+
},
|
1438
|
+
outputs: {
|
1439
|
+
mongodb: mongodbEntity,
|
1440
|
+
service: serviceEntity
|
1441
|
+
},
|
1442
|
+
meta: {
|
1443
|
+
displayName: "MongoDB",
|
1444
|
+
description: "The MongoDB instance deployed on Kubernetes.",
|
1445
|
+
primaryIcon: "simple-icons:mongodb",
|
1446
|
+
secondaryIcon: "mdi:database"
|
1447
|
+
},
|
1448
|
+
source: {
|
1449
|
+
type: "npm",
|
1450
|
+
package: "@highstate/apps",
|
1451
|
+
path: "mongodb/app"
|
1452
|
+
}
|
1453
|
+
});
|
1454
|
+
const mongodbDatabase = defineUnit({
|
1455
|
+
type: "apps.mongodb.database",
|
1456
|
+
args: {
|
1457
|
+
database: Type.Optional(Type.String()),
|
1458
|
+
username: Type.Optional(Type.String())
|
1459
|
+
},
|
1460
|
+
secrets: {
|
1461
|
+
password: Type.Optional(Type.String())
|
1462
|
+
},
|
1463
|
+
inputs: {
|
1464
|
+
k8sCluster: clusterEntity$1,
|
1465
|
+
mongodb: mongodbEntity
|
1466
|
+
},
|
1467
|
+
meta: {
|
1468
|
+
displayName: "MongoDB Database",
|
1469
|
+
description: "The virtual MongoDB database created on the MongoDB instance. Works only for MongoDB instances deployed on Kubernetes.",
|
1470
|
+
primaryIcon: "simple-icons:mongodb",
|
1471
|
+
secondaryIcon: "mdi:database-plus"
|
1472
|
+
},
|
1473
|
+
source: {
|
1474
|
+
type: "npm",
|
1475
|
+
package: "@highstate/apps",
|
1476
|
+
path: "mongodb/database"
|
1477
|
+
}
|
1478
|
+
});
|
1479
|
+
|
1480
|
+
const deployment = defineUnit({
|
1481
|
+
type: "apps.deployment",
|
1482
|
+
args: {
|
1483
|
+
appName: Type.Optional(Type.String()),
|
1484
|
+
fqdn: Type.Optional(Type.String()),
|
1485
|
+
serviceType: Type.Optional(serviceTypeSchema),
|
1486
|
+
image: Type.Optional(Type.String()),
|
1487
|
+
port: Type.Optional(Type.Number()),
|
1488
|
+
replicas: Type.Optional(Type.Number()),
|
1489
|
+
dataPath: Type.Optional(Type.String()),
|
1490
|
+
env: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
1491
|
+
mariadbEnvMapping: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
1492
|
+
postgresqlEnvMapping: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
1493
|
+
mongodbEnvMapping: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
1494
|
+
manifest: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
1495
|
+
serviceManifest: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
1496
|
+
httpRouteManifest: Type.Optional(Type.Record(Type.String(), Type.Any()))
|
1497
|
+
},
|
1498
|
+
inputs: {
|
1499
|
+
k8sCluster: clusterEntity$1,
|
1500
|
+
mariadb: {
|
1501
|
+
entity: mariadbEntity,
|
1502
|
+
required: false
|
1503
|
+
},
|
1504
|
+
postgresql: {
|
1505
|
+
entity: postgresqlEntity,
|
1506
|
+
required: false
|
1507
|
+
},
|
1508
|
+
mongodb: {
|
1509
|
+
entity: mongodbEntity,
|
1510
|
+
required: false
|
1511
|
+
},
|
1512
|
+
resticRepo: {
|
1513
|
+
entity: repoEntity,
|
1514
|
+
required: false
|
1515
|
+
},
|
1516
|
+
dnsProvider: {
|
1517
|
+
entity: dnsProviderEntity,
|
1518
|
+
required: false
|
1519
|
+
}
|
1520
|
+
},
|
1521
|
+
outputs: {
|
1522
|
+
deployment: deploymentEntity,
|
1523
|
+
service: serviceEntity
|
1524
|
+
},
|
1525
|
+
secrets: {
|
1526
|
+
mariadbPassword: Type.Optional(Type.String()),
|
1527
|
+
postgresqlPassword: Type.Optional(Type.String()),
|
1528
|
+
mongodbPassword: Type.Optional(Type.String())
|
1529
|
+
},
|
1530
|
+
meta: {
|
1531
|
+
displayName: "Kubernetes Deployment",
|
1532
|
+
description: "A generic Kubernetes deployment with optional service and gateway routes.",
|
1533
|
+
primaryIcon: "mdi:kubernetes",
|
1534
|
+
secondaryIcon: "mdi:cube-outline"
|
1535
|
+
},
|
1536
|
+
source: {
|
1537
|
+
type: "npm",
|
1538
|
+
package: "@highstate/apps"
|
1539
|
+
}
|
1540
|
+
});
|
1541
|
+
|
1542
|
+
const backupModeSchema = Type.Union([Type.Literal("metadata"), Type.Literal("full")]);
|
1543
|
+
const syncthing = defineUnit({
|
1544
|
+
type: "apps.syncthing",
|
1545
|
+
args: {
|
1546
|
+
fqdn: Type.String(),
|
1547
|
+
deviceFqdn: Type.Optional(Type.String()),
|
1548
|
+
appName: Type.Optional(Type.String()),
|
1549
|
+
backupMode: Type.Optional({ ...backupModeSchema, default: "metadata" })
|
1550
|
+
},
|
1551
|
+
inputs: {
|
1552
|
+
accessPoint: accessPointEntity,
|
1553
|
+
k8sCluster: clusterEntity$1,
|
1554
|
+
resticRepo: {
|
1555
|
+
entity: repoEntity,
|
1556
|
+
required: false
|
1557
|
+
},
|
1558
|
+
volume: {
|
1559
|
+
entity: persistentVolumeClaimEntity,
|
1560
|
+
required: false
|
1561
|
+
}
|
1562
|
+
},
|
1563
|
+
outputs: {
|
1564
|
+
service: serviceEntity,
|
1565
|
+
volume: persistentVolumeClaimEntity
|
1566
|
+
},
|
1567
|
+
meta: {
|
1568
|
+
displayName: "Syncthing",
|
1569
|
+
description: "The Syncthing instance deployed on Kubernetes.",
|
1570
|
+
primaryIcon: "simple-icons:syncthing"
|
1571
|
+
},
|
1572
|
+
source: {
|
1573
|
+
type: "npm",
|
1574
|
+
package: "@highstate/apps",
|
1575
|
+
path: "syncthing"
|
1576
|
+
}
|
1577
|
+
});
|
1578
|
+
|
1579
|
+
const codeServer = defineUnit({
|
1580
|
+
type: "apps.code-server",
|
1581
|
+
args: {
|
1582
|
+
fqdn: Type.String(),
|
1583
|
+
appName: Type.Optional(Type.String())
|
1584
|
+
},
|
1585
|
+
secrets: {
|
1586
|
+
password: Type.Optional(Type.String()),
|
1587
|
+
sudoPassword: Type.Optional(Type.String())
|
1588
|
+
},
|
1589
|
+
inputs: {
|
1590
|
+
accessPoint: accessPointEntity,
|
1591
|
+
k8sCluster: clusterEntity$1,
|
1592
|
+
resticRepo: {
|
1593
|
+
entity: repoEntity,
|
1594
|
+
required: false
|
1595
|
+
},
|
1596
|
+
volume: {
|
1597
|
+
entity: persistentVolumeClaimEntity,
|
1598
|
+
required: false
|
1599
|
+
}
|
1600
|
+
},
|
1601
|
+
outputs: {
|
1602
|
+
statefulSet: statefulSetEntity,
|
1603
|
+
volume: persistentVolumeClaimEntity
|
1604
|
+
},
|
1605
|
+
meta: {
|
1606
|
+
displayName: "Code Server",
|
1607
|
+
description: "The Code Server instance deployed on Kubernetes.",
|
1608
|
+
primaryIcon: "material-icon-theme:vscode"
|
1609
|
+
},
|
1610
|
+
source: {
|
1611
|
+
type: "npm",
|
1612
|
+
package: "@highstate/apps",
|
1613
|
+
path: "code-server"
|
1185
1614
|
}
|
1186
1615
|
});
|
1187
1616
|
|
1188
1617
|
var index = /*#__PURE__*/Object.freeze({
|
1189
1618
|
__proto__: null,
|
1619
|
+
backupModeSchema: backupModeSchema,
|
1620
|
+
codeServer: codeServer,
|
1621
|
+
deployment: deployment,
|
1190
1622
|
grocy: grocy,
|
1191
1623
|
kubernetesDashboard: kubernetesDashboard,
|
1192
1624
|
mariadb: mariadb,
|
1625
|
+
mariadbDatabase: mariadbDatabase,
|
1193
1626
|
mariadbEntity: mariadbEntity,
|
1194
1627
|
maybe: maybe,
|
1628
|
+
mongodb: mongodb,
|
1629
|
+
mongodbDatabase: mongodbDatabase,
|
1630
|
+
mongodbEntity: mongodbEntity,
|
1195
1631
|
postgresql: postgresql,
|
1632
|
+
postgresqlDatabase: postgresqlDatabase,
|
1196
1633
|
postgresqlEntity: postgresqlEntity,
|
1634
|
+
syncthing: syncthing,
|
1197
1635
|
traefikGateway: traefikGateway,
|
1198
1636
|
vaultwarden: vaultwarden
|
1199
1637
|
});
|
@@ -1250,4 +1688,38 @@ var k3s = /*#__PURE__*/Object.freeze({
|
|
1250
1688
|
cluster: cluster
|
1251
1689
|
});
|
1252
1690
|
|
1253
|
-
|
1691
|
+
const endpointType = Type.Union([
|
1692
|
+
Type.Literal("fqdn"),
|
1693
|
+
Type.Literal("ipv4"),
|
1694
|
+
Type.Literal("ipv6")
|
1695
|
+
]);
|
1696
|
+
const peer = defineUnit({
|
1697
|
+
type: "mullvad.peer",
|
1698
|
+
args: {
|
1699
|
+
hostname: Type.Optional(Type.String()),
|
1700
|
+
endpointType: Type.Optional({ ...endpointType, default: "fqdn" })
|
1701
|
+
},
|
1702
|
+
outputs: {
|
1703
|
+
peer: peerEntity
|
1704
|
+
},
|
1705
|
+
meta: {
|
1706
|
+
displayName: "Mullvad Peer",
|
1707
|
+
description: "The Mullvad WireGuard peer fetched from the Mullvad API.",
|
1708
|
+
primaryIcon: "simple-icons:mullvad",
|
1709
|
+
secondaryIcon: "cib:wireguard",
|
1710
|
+
secondaryIconColor: "#88171a"
|
1711
|
+
},
|
1712
|
+
source: {
|
1713
|
+
type: "npm",
|
1714
|
+
package: "@highstate/mullvad",
|
1715
|
+
path: "peer"
|
1716
|
+
}
|
1717
|
+
});
|
1718
|
+
|
1719
|
+
var mullvad = /*#__PURE__*/Object.freeze({
|
1720
|
+
__proto__: null,
|
1721
|
+
endpointType: endpointType,
|
1722
|
+
peer: peer
|
1723
|
+
});
|
1724
|
+
|
1725
|
+
export { index as apps, cloudflare, common, k3s, k8s, mullvad, proxmox, restic, ssh, talos, wireguard };
|