@highstate/library 0.11.7 → 0.12.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/highstate.library.msgpack +0 -0
- package/dist/index.js +551 -92
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/databases/index.ts +2 -0
- package/src/databases/redis.ts +48 -0
- package/src/databases/s3.ts +123 -0
- package/src/k3s.ts +14 -0
- package/src/k8s/apps/index.ts +2 -0
- package/src/k8s/apps/maybe.ts +1 -1
- package/src/k8s/apps/minio.ts +81 -0
- package/src/k8s/apps/shared.ts +4 -1
- package/src/k8s/apps/traefik.ts +7 -1
- package/src/k8s/apps/valkey.ts +52 -0
- package/src/proxmox.ts +7 -0
- package/src/third-party/timeweb.ts +9 -0
- package/src/third-party/yandex.ts +241 -63
package/dist/index.js
CHANGED
|
@@ -907,20 +907,20 @@ var secrets = $secrets({
|
|
|
907
907
|
/**
|
|
908
908
|
* The SSH private key in PEM format.
|
|
909
909
|
*/
|
|
910
|
-
sshPrivateKey: z.string().optional().meta({ multiline: true }),
|
|
910
|
+
sshPrivateKey: $addArgumentDescription(z.string().optional().meta({ multiline: true }), `The SSH private key in PEM format.`),
|
|
911
911
|
/**
|
|
912
912
|
* The SSH password to use for authentication.
|
|
913
913
|
*/
|
|
914
|
-
sshPassword: z.string().optional()
|
|
914
|
+
sshPassword: $addArgumentDescription(z.string().optional(), `The SSH password to use for authentication.`)
|
|
915
915
|
});
|
|
916
916
|
var inputs2 = $inputs({
|
|
917
917
|
/**
|
|
918
918
|
* The SSH key pair to use for authentication.
|
|
919
919
|
*/
|
|
920
|
-
sshKeyPair: {
|
|
920
|
+
sshKeyPair: $addInputDescription({
|
|
921
921
|
entity: keyPairEntity,
|
|
922
922
|
required: false
|
|
923
|
-
}
|
|
923
|
+
}, `The SSH key pair to use for authentication.`)
|
|
924
924
|
});
|
|
925
925
|
var keyPair = defineUnit({
|
|
926
926
|
type: "ssh.key-pair.v1",
|
|
@@ -974,14 +974,14 @@ var serverOutputs = $outputs({
|
|
|
974
974
|
/**
|
|
975
975
|
* The server entity representing the server.
|
|
976
976
|
*/
|
|
977
|
-
server: serverEntity,
|
|
977
|
+
server: $addInputDescription(serverEntity, `The server entity representing the server.`),
|
|
978
978
|
/**
|
|
979
979
|
* The L3 endpoints of the server.
|
|
980
980
|
*/
|
|
981
|
-
endpoints: {
|
|
981
|
+
endpoints: $addInputDescription({
|
|
982
982
|
entity: l3EndpointEntity,
|
|
983
983
|
multiple: true
|
|
984
|
-
}
|
|
984
|
+
}, `The L3 endpoints of the server.`)
|
|
985
985
|
});
|
|
986
986
|
var vmSshArgs = argsSchema.omit({ user: true }).prefault({});
|
|
987
987
|
var vmSecrets = $secrets({
|
|
@@ -990,13 +990,17 @@ var vmSecrets = $secrets({
|
|
|
990
990
|
*
|
|
991
991
|
* If not specified, will be generated automatically.
|
|
992
992
|
*/
|
|
993
|
-
rootPassword: z.string().optional(),
|
|
993
|
+
rootPassword: $addArgumentDescription(z.string().optional(), `The root password for the virtual machine.
|
|
994
|
+
|
|
995
|
+
If not specified, will be generated automatically.`),
|
|
994
996
|
/**
|
|
995
997
|
* The SSH private for the `root` user of the virtual machine in PEM format.
|
|
996
998
|
*
|
|
997
999
|
* If not specified or provided via `keyPair`, will be generated automatically.
|
|
998
1000
|
*/
|
|
999
|
-
sshPrivateKey: secrets.sshPrivateKey
|
|
1001
|
+
sshPrivateKey: $addArgumentDescription(secrets.sshPrivateKey, `The SSH private for the \`root\` user of the virtual machine in PEM format.
|
|
1002
|
+
|
|
1003
|
+
If not specified or provided via \`keyPair\`, will be generated automatically.`)
|
|
1000
1004
|
});
|
|
1001
1005
|
var existingServer = defineUnit({
|
|
1002
1006
|
type: "common.existing-server.v1",
|
|
@@ -1145,9 +1149,15 @@ __export(databases_exports, {
|
|
|
1145
1149
|
existingMariadb: () => existingMariadb,
|
|
1146
1150
|
existingMongodb: () => existingMongodb,
|
|
1147
1151
|
existingPostgresql: () => existingPostgresql,
|
|
1152
|
+
existingRedis: () => existingRedis,
|
|
1153
|
+
existingS3: () => existingS3,
|
|
1148
1154
|
mariadbEntity: () => mariadbEntity,
|
|
1149
1155
|
mongodbEntity: () => mongodbEntity,
|
|
1150
1156
|
postgresqlEntity: () => postgresqlEntity,
|
|
1157
|
+
redisEntity: () => redisEntity,
|
|
1158
|
+
s3BucketPolicySchema: () => s3BucketPolicySchema,
|
|
1159
|
+
s3BucketSchema: () => s3BucketSchema,
|
|
1160
|
+
s3Entity: () => s3Entity,
|
|
1151
1161
|
sharedArgs: () => sharedArgs,
|
|
1152
1162
|
sharedInputs: () => sharedInputs,
|
|
1153
1163
|
sharedSchema: () => sharedSchema,
|
|
@@ -1175,33 +1185,35 @@ var sharedArgs = $args({
|
|
|
1175
1185
|
/**
|
|
1176
1186
|
* The endpoints to connect to the database in form of `host:port`.
|
|
1177
1187
|
*/
|
|
1178
|
-
endpoints: z.string().array().min(1),
|
|
1188
|
+
endpoints: $addArgumentDescription(z.string().array().min(1), `The endpoints to connect to the database in form of \`host:port\`.`),
|
|
1179
1189
|
/**
|
|
1180
1190
|
* The username to connect to the database with.
|
|
1181
1191
|
*
|
|
1182
1192
|
* If not provided, defaults to `root`.
|
|
1183
1193
|
*/
|
|
1184
|
-
username: z.string().default("root"),
|
|
1194
|
+
username: $addArgumentDescription(z.string().default("root"), `The username to connect to the database with.
|
|
1195
|
+
|
|
1196
|
+
If not provided, defaults to \`root\`.`),
|
|
1185
1197
|
/**
|
|
1186
1198
|
* The name of the database to connect to.
|
|
1187
1199
|
*/
|
|
1188
|
-
database: z.string().optional()
|
|
1200
|
+
database: $addArgumentDescription(z.string().optional(), `The name of the database to connect to.`)
|
|
1189
1201
|
});
|
|
1190
1202
|
var sharedSecrets = $secrets({
|
|
1191
1203
|
/**
|
|
1192
1204
|
* The password to connect to the database with.
|
|
1193
1205
|
*/
|
|
1194
|
-
password: z.string().optional()
|
|
1206
|
+
password: $addArgumentDescription(z.string().optional(), `The password to connect to the database with.`)
|
|
1195
1207
|
});
|
|
1196
1208
|
var sharedInputs = $inputs({
|
|
1197
1209
|
/**
|
|
1198
1210
|
* The endpoints to connect to the database.
|
|
1199
1211
|
*/
|
|
1200
|
-
endpoints: {
|
|
1212
|
+
endpoints: $addInputDescription({
|
|
1201
1213
|
entity: l4EndpointEntity,
|
|
1202
1214
|
multiple: true,
|
|
1203
1215
|
required: false
|
|
1204
|
-
}
|
|
1216
|
+
}, `The endpoints to connect to the database.`)
|
|
1205
1217
|
});
|
|
1206
1218
|
|
|
1207
1219
|
// src/databases/mariadb.ts
|
|
@@ -1289,6 +1301,132 @@ var existingPostgresql = defineUnit({
|
|
|
1289
1301
|
category: "Databases"
|
|
1290
1302
|
}
|
|
1291
1303
|
});
|
|
1304
|
+
var redisEntity = defineEntity({
|
|
1305
|
+
type: "databases.redis.v1",
|
|
1306
|
+
schema: sharedSchema.pick({ endpoints: true }).extend({
|
|
1307
|
+
/**
|
|
1308
|
+
* The number of the database to use.
|
|
1309
|
+
*/
|
|
1310
|
+
database: z.number().default(0)
|
|
1311
|
+
}),
|
|
1312
|
+
meta: {
|
|
1313
|
+
description: `Represents the Redis database or virtual database behind it.`,
|
|
1314
|
+
color: "#dc382d"
|
|
1315
|
+
}
|
|
1316
|
+
});
|
|
1317
|
+
var existingRedis = defineUnit({
|
|
1318
|
+
type: "databases.redis.existing.v1",
|
|
1319
|
+
args: sharedArgs,
|
|
1320
|
+
inputs: sharedInputs,
|
|
1321
|
+
outputs: {
|
|
1322
|
+
redis: redisEntity
|
|
1323
|
+
},
|
|
1324
|
+
source: {
|
|
1325
|
+
package: "@highstate/common",
|
|
1326
|
+
path: "units/databases/existing-redis"
|
|
1327
|
+
},
|
|
1328
|
+
meta: {
|
|
1329
|
+
description: `The existing Redis database or virtual database behind it.`,
|
|
1330
|
+
title: "Existing Redis Database",
|
|
1331
|
+
icon: "simple-icons:redis",
|
|
1332
|
+
secondaryIcon: "mdi:database",
|
|
1333
|
+
category: "Databases"
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1336
|
+
var s3BucketPolicySchema = z.enum(["none", "download", "upload", "public"]);
|
|
1337
|
+
var s3BucketSchema = z.object({
|
|
1338
|
+
/**
|
|
1339
|
+
* The name of the bucket.
|
|
1340
|
+
*/
|
|
1341
|
+
name: z.string().meta({ title: camelCaseToHumanReadable("name"), description: `The name of the bucket.` }),
|
|
1342
|
+
/**
|
|
1343
|
+
* The optional policy applied to the bucket.
|
|
1344
|
+
*/
|
|
1345
|
+
policy: s3BucketPolicySchema.optional().meta({ title: camelCaseToHumanReadable("policy"), description: `The optional policy applied to the bucket.` })
|
|
1346
|
+
});
|
|
1347
|
+
var s3Args = $args({
|
|
1348
|
+
/**
|
|
1349
|
+
* The endpoints to connect to the S3-compatible API in form of `host:port`.
|
|
1350
|
+
*/
|
|
1351
|
+
endpoints: $addArgumentDescription(z.string().array().min(1), `The endpoints to connect to the S3-compatible API in form of \`host:port\`.`),
|
|
1352
|
+
/**
|
|
1353
|
+
* The access key used to authenticate against the S3-compatible API.
|
|
1354
|
+
*/
|
|
1355
|
+
accessKey: $addArgumentDescription(z.string(), `The access key used to authenticate against the S3-compatible API.`),
|
|
1356
|
+
/**
|
|
1357
|
+
* The region associated with the S3-compatible deployment.
|
|
1358
|
+
*/
|
|
1359
|
+
region: $addArgumentDescription(z.string().optional(), `The region associated with the S3-compatible deployment.`),
|
|
1360
|
+
/**
|
|
1361
|
+
* The buckets that must exist on the instance.
|
|
1362
|
+
*/
|
|
1363
|
+
buckets: $addArgumentDescription(s3BucketSchema.array().default([]), `The buckets that must exist on the instance.`)
|
|
1364
|
+
});
|
|
1365
|
+
var s3Secrets = $secrets({
|
|
1366
|
+
/**
|
|
1367
|
+
* The secret key used to authenticate against the S3-compatible API.
|
|
1368
|
+
*/
|
|
1369
|
+
secretKey: $addArgumentDescription(z.string(), `The secret key used to authenticate against the S3-compatible API.`)
|
|
1370
|
+
});
|
|
1371
|
+
var s3Inputs = $inputs({
|
|
1372
|
+
/**
|
|
1373
|
+
* The endpoints to connect to the S3-compatible API.
|
|
1374
|
+
*/
|
|
1375
|
+
endpoints: $addInputDescription({
|
|
1376
|
+
entity: l4EndpointEntity,
|
|
1377
|
+
multiple: true,
|
|
1378
|
+
required: false
|
|
1379
|
+
}, `The endpoints to connect to the S3-compatible API.`)
|
|
1380
|
+
});
|
|
1381
|
+
var s3Entity = defineEntity({
|
|
1382
|
+
type: "databases.s3.v1",
|
|
1383
|
+
schema: z.object({
|
|
1384
|
+
/**
|
|
1385
|
+
* The endpoints that expose the S3-compatible API.
|
|
1386
|
+
*/
|
|
1387
|
+
endpoints: l4EndpointEntity.schema.array().meta({ title: camelCaseToHumanReadable("endpoints"), description: `The endpoints that expose the S3-compatible API.` }),
|
|
1388
|
+
/**
|
|
1389
|
+
* The region associated with the object storage instance.
|
|
1390
|
+
*/
|
|
1391
|
+
region: z.string().optional().meta({ title: camelCaseToHumanReadable("region"), description: `The region associated with the object storage instance.` }),
|
|
1392
|
+
/**
|
|
1393
|
+
* The access key used to authenticate against the API.
|
|
1394
|
+
*/
|
|
1395
|
+
accessKey: z.string().meta({ title: camelCaseToHumanReadable("accessKey"), description: `The access key used to authenticate against the API.` }),
|
|
1396
|
+
/**
|
|
1397
|
+
* The secret key used to authenticate against the API.
|
|
1398
|
+
*/
|
|
1399
|
+
secretKey: z.string().meta({ title: camelCaseToHumanReadable("secretKey"), description: `The secret key used to authenticate against the API.` }),
|
|
1400
|
+
/**
|
|
1401
|
+
* The buckets that must exist on the instance.
|
|
1402
|
+
*/
|
|
1403
|
+
buckets: s3BucketSchema.array().meta({ title: camelCaseToHumanReadable("buckets"), description: `The buckets that must exist on the instance.` })
|
|
1404
|
+
}),
|
|
1405
|
+
meta: {
|
|
1406
|
+
description: `Represents an S3-compatible object storage endpoint.`,
|
|
1407
|
+
color: "#ff9900"
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
var existingS3 = defineUnit({
|
|
1411
|
+
type: "databases.s3.existing.v1",
|
|
1412
|
+
args: s3Args,
|
|
1413
|
+
secrets: s3Secrets,
|
|
1414
|
+
inputs: s3Inputs,
|
|
1415
|
+
outputs: {
|
|
1416
|
+
s3: s3Entity
|
|
1417
|
+
},
|
|
1418
|
+
source: {
|
|
1419
|
+
package: "@highstate/common",
|
|
1420
|
+
path: "units/databases/existing-s3"
|
|
1421
|
+
},
|
|
1422
|
+
meta: {
|
|
1423
|
+
description: `The existing S3-compatible object storage instance.`,
|
|
1424
|
+
title: "Existing S3-Compatible Storage",
|
|
1425
|
+
icon: "simple-icons:amazons3",
|
|
1426
|
+
secondaryIcon: "mdi:bucket",
|
|
1427
|
+
category: "Databases"
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1292
1430
|
|
|
1293
1431
|
// src/distributions/index.ts
|
|
1294
1432
|
var distributions_exports = {};
|
|
@@ -1571,7 +1709,11 @@ var scheduleOnMastersPolicyArgs = $args({
|
|
|
1571
1709
|
* - `when-no-workers`: schedule workloads on master nodes only if there are no workers (default);
|
|
1572
1710
|
* - `never`: never schedule workloads on master nodes.
|
|
1573
1711
|
*/
|
|
1574
|
-
scheduleOnMastersPolicy: scheduleOnMastersPolicySchema.default("when-no-workers")
|
|
1712
|
+
scheduleOnMastersPolicy: $addArgumentDescription(scheduleOnMastersPolicySchema.default("when-no-workers"), `The policy for scheduling workloads on master nodes.
|
|
1713
|
+
|
|
1714
|
+
- \`always\`: always schedule workloads on master nodes regardless of the number of workers;
|
|
1715
|
+
- \`when-no-workers\`: schedule workloads on master nodes only if there are no workers (default);
|
|
1716
|
+
- \`never\`: never schedule workloads on master nodes.`)
|
|
1575
1717
|
});
|
|
1576
1718
|
var clusterInputs = {
|
|
1577
1719
|
masters: {
|
|
@@ -1800,6 +1942,22 @@ var cluster = defineUnit({
|
|
|
1800
1942
|
*/
|
|
1801
1943
|
config: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The K3S configuration to pass to each server or agent in the cluster.
|
|
1802
1944
|
|
|
1945
|
+
See: https://docs.k3s.io/installation/configuration`),
|
|
1946
|
+
/**
|
|
1947
|
+
* The K3S configuration to pass to each server in the cluster.
|
|
1948
|
+
*
|
|
1949
|
+
* See: https://docs.k3s.io/installation/configuration
|
|
1950
|
+
*/
|
|
1951
|
+
serverConfig: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The K3S configuration to pass to each server in the cluster.
|
|
1952
|
+
|
|
1953
|
+
See: https://docs.k3s.io/installation/configuration`),
|
|
1954
|
+
/**
|
|
1955
|
+
* The K3S configuration to pass to each agent in the cluster.
|
|
1956
|
+
*
|
|
1957
|
+
* See: https://docs.k3s.io/installation/configuration
|
|
1958
|
+
*/
|
|
1959
|
+
agentConfig: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The K3S configuration to pass to each agent in the cluster.
|
|
1960
|
+
|
|
1803
1961
|
See: https://docs.k3s.io/installation/configuration`),
|
|
1804
1962
|
/**
|
|
1805
1963
|
* The configuration of the registries to use for the K3S cluster.
|
|
@@ -1888,6 +2046,7 @@ __export(apps_exports, {
|
|
|
1888
2046
|
mariadb: () => mariadb,
|
|
1889
2047
|
mariadbDatabase: () => mariadbDatabase,
|
|
1890
2048
|
maybe: () => maybe,
|
|
2049
|
+
minio: () => minio,
|
|
1891
2050
|
mongodb: () => mongodb,
|
|
1892
2051
|
mongodbDatabase: () => mongodbDatabase,
|
|
1893
2052
|
optionalSharedArgs: () => optionalSharedArgs,
|
|
@@ -1899,6 +2058,7 @@ __export(apps_exports, {
|
|
|
1899
2058
|
sharedSecrets: () => sharedSecrets2,
|
|
1900
2059
|
syncthing: () => syncthing,
|
|
1901
2060
|
traefik: () => traefik,
|
|
2061
|
+
valkey: () => valkey,
|
|
1902
2062
|
vaultwarden: () => vaultwarden,
|
|
1903
2063
|
workload: () => workload
|
|
1904
2064
|
});
|
|
@@ -2091,21 +2251,23 @@ var sharedArgs2 = $args({
|
|
|
2091
2251
|
/**
|
|
2092
2252
|
* The FQDN where the application will be accessible.
|
|
2093
2253
|
*/
|
|
2094
|
-
fqdn: z.string(),
|
|
2254
|
+
fqdn: $addArgumentDescription(z.string(), `The FQDN where the application will be accessible.`),
|
|
2095
2255
|
/**
|
|
2096
2256
|
* The endpoints where the application will or should be accessible.
|
|
2097
2257
|
*
|
|
2098
2258
|
* Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.
|
|
2099
2259
|
*/
|
|
2100
|
-
endpoints: z.string().array().default([]),
|
|
2260
|
+
endpoints: $addArgumentDescription(z.string().array().default([]), `The endpoints where the application will or should be accessible.
|
|
2261
|
+
|
|
2262
|
+
Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.`),
|
|
2101
2263
|
/**
|
|
2102
2264
|
* Whether the application should be exposed externally by NodePort or LoadBalancer service.
|
|
2103
2265
|
*/
|
|
2104
|
-
external: z.boolean().default(false),
|
|
2266
|
+
external: $addArgumentDescription(z.boolean().default(false), `Whether the application should be exposed externally by NodePort or LoadBalancer service.`),
|
|
2105
2267
|
/**
|
|
2106
2268
|
* The number of replicas for the application.
|
|
2107
2269
|
*/
|
|
2108
|
-
replicas: z.number().default(1)
|
|
2270
|
+
replicas: $addArgumentDescription(z.number().default(1), `The number of replicas for the application.`)
|
|
2109
2271
|
});
|
|
2110
2272
|
var optionalSharedArgs = mapValues(sharedArgs2, (arg) => ({
|
|
2111
2273
|
...arg,
|
|
@@ -2130,11 +2292,11 @@ var sharedSecrets2 = $secrets({
|
|
|
2130
2292
|
/**
|
|
2131
2293
|
* The root password for the database instance. If not provided, a random password will be generated.
|
|
2132
2294
|
*/
|
|
2133
|
-
rootPassword: z.string().optional(),
|
|
2295
|
+
rootPassword: $addArgumentDescription(z.string().optional(), `The root password for the database instance. If not provided, a random password will be generated.`),
|
|
2134
2296
|
/**
|
|
2135
2297
|
* The key to use for backup encryption. If not provided, a random key will be generated.
|
|
2136
2298
|
*/
|
|
2137
|
-
backupKey: z.string().optional()
|
|
2299
|
+
backupKey: $addArgumentDescription(z.string().optional(), `The key to use for backup encryption. If not provided, a random key will be generated.`)
|
|
2138
2300
|
});
|
|
2139
2301
|
var sharedDatabaseArgs = $args({
|
|
2140
2302
|
/**
|
|
@@ -2142,13 +2304,17 @@ var sharedDatabaseArgs = $args({
|
|
|
2142
2304
|
*
|
|
2143
2305
|
* If not provided, defaults to the name of the instance.
|
|
2144
2306
|
*/
|
|
2145
|
-
username: z.string().optional(),
|
|
2307
|
+
username: $addArgumentDescription(z.string().optional(), `The username for the database user.
|
|
2308
|
+
|
|
2309
|
+
If not provided, defaults to the name of the instance.`),
|
|
2146
2310
|
/**
|
|
2147
2311
|
* The name of the database to create.
|
|
2148
2312
|
*
|
|
2149
2313
|
* If not provided, defaults to the username.
|
|
2150
2314
|
*/
|
|
2151
|
-
database: z.string().optional()
|
|
2315
|
+
database: $addArgumentDescription(z.string().optional(), `The name of the database to create.
|
|
2316
|
+
|
|
2317
|
+
If not provided, defaults to the username.`)
|
|
2152
2318
|
});
|
|
2153
2319
|
var sharedDatabaseSecrets = $secrets({
|
|
2154
2320
|
/**
|
|
@@ -2156,7 +2322,9 @@ var sharedDatabaseSecrets = $secrets({
|
|
|
2156
2322
|
*
|
|
2157
2323
|
* If not provided, a random password will be generated.
|
|
2158
2324
|
*/
|
|
2159
|
-
password: z.string().optional()
|
|
2325
|
+
password: $addArgumentDescription(z.string().optional(), `The password for the database user.
|
|
2326
|
+
|
|
2327
|
+
If not provided, a random password will be generated.`)
|
|
2160
2328
|
});
|
|
2161
2329
|
var sharedInputs2 = $inputs({
|
|
2162
2330
|
k8sCluster: {
|
|
@@ -2186,6 +2354,9 @@ var sharedInputs2 = $inputs({
|
|
|
2186
2354
|
},
|
|
2187
2355
|
mongodb: {
|
|
2188
2356
|
entity: mongodbEntity
|
|
2357
|
+
},
|
|
2358
|
+
redis: {
|
|
2359
|
+
entity: redisEntity
|
|
2189
2360
|
}
|
|
2190
2361
|
});
|
|
2191
2362
|
var optionalSharedInputs = mapValues(sharedInputs2, (input) => ({
|
|
@@ -2352,7 +2523,7 @@ var maybe = defineUnit({
|
|
|
2352
2523
|
secretKey: z.string().optional()
|
|
2353
2524
|
},
|
|
2354
2525
|
inputs: {
|
|
2355
|
-
...pick(sharedInputs2, ["k8sCluster", "accessPoint", "postgresql"]),
|
|
2526
|
+
...pick(sharedInputs2, ["k8sCluster", "accessPoint", "postgresql", "redis"]),
|
|
2356
2527
|
...pick(optionalSharedInputs, ["resticRepo"])
|
|
2357
2528
|
},
|
|
2358
2529
|
meta: {
|
|
@@ -2363,6 +2534,68 @@ var maybe = defineUnit({
|
|
|
2363
2534
|
},
|
|
2364
2535
|
source: source("maybe")
|
|
2365
2536
|
});
|
|
2537
|
+
var minioSecrets = $secrets({
|
|
2538
|
+
/**
|
|
2539
|
+
* The secret key used to authenticate with MinIO.
|
|
2540
|
+
*/
|
|
2541
|
+
secretKey: $addArgumentDescription(z.string().optional(), `The secret key used to authenticate with MinIO.`),
|
|
2542
|
+
/**
|
|
2543
|
+
* The key that protects Restic backups.
|
|
2544
|
+
*/
|
|
2545
|
+
backupKey: $addArgumentDescription(z.string().optional(), `The key that protects Restic backups.`)
|
|
2546
|
+
});
|
|
2547
|
+
var minio = defineUnit({
|
|
2548
|
+
type: "k8s.apps.minio.v1",
|
|
2549
|
+
args: {
|
|
2550
|
+
...appName("minio"),
|
|
2551
|
+
...pick(sharedArgs2, ["external"]),
|
|
2552
|
+
accessKey: {
|
|
2553
|
+
schema: z.string().default("admin"),
|
|
2554
|
+
meta: {
|
|
2555
|
+
description: text`
|
|
2556
|
+
The access key used to authenticate with MinIO.
|
|
2557
|
+
If not provided, defaults to "admin".
|
|
2558
|
+
`
|
|
2559
|
+
}
|
|
2560
|
+
},
|
|
2561
|
+
region: {
|
|
2562
|
+
schema: z.string().optional(),
|
|
2563
|
+
meta: {
|
|
2564
|
+
description: text`The region associated with the MinIO deployment.`
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
buckets: {
|
|
2568
|
+
schema: s3BucketSchema.array().default([]),
|
|
2569
|
+
meta: {
|
|
2570
|
+
description: text`
|
|
2571
|
+
The buckets that must exist on the MinIO instance.
|
|
2572
|
+
Each entry can optionally include a bucket policy: none, download, upload, or public.
|
|
2573
|
+
`
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
},
|
|
2577
|
+
secrets: minioSecrets,
|
|
2578
|
+
inputs: {
|
|
2579
|
+
...pick(sharedInputs2, ["k8sCluster"]),
|
|
2580
|
+
...pick(optionalSharedInputs, ["resticRepo"])
|
|
2581
|
+
},
|
|
2582
|
+
outputs: {
|
|
2583
|
+
s3: s3Entity,
|
|
2584
|
+
service: serviceEntity,
|
|
2585
|
+
endpoints: {
|
|
2586
|
+
entity: l4EndpointEntity,
|
|
2587
|
+
multiple: true
|
|
2588
|
+
}
|
|
2589
|
+
},
|
|
2590
|
+
meta: {
|
|
2591
|
+
description: `The MinIO object storage deployed on Kubernetes.`,
|
|
2592
|
+
title: "MinIO",
|
|
2593
|
+
icon: "simple-icons:minio",
|
|
2594
|
+
secondaryIcon: "mdi:bucket",
|
|
2595
|
+
category: "Databases"
|
|
2596
|
+
},
|
|
2597
|
+
source: source("minio/app")
|
|
2598
|
+
});
|
|
2366
2599
|
var mongodb = defineUnit({
|
|
2367
2600
|
type: "k8s.apps.mongodb.v1",
|
|
2368
2601
|
args: {
|
|
@@ -2530,7 +2763,14 @@ var traefik = defineUnit({
|
|
|
2530
2763
|
args: {
|
|
2531
2764
|
...appName("traefik"),
|
|
2532
2765
|
...pick(sharedArgs2, ["external", "replicas", "endpoints"]),
|
|
2533
|
-
|
|
2766
|
+
/**
|
|
2767
|
+
* The name of the class to configure for ingress and gateway resources.
|
|
2768
|
+
*
|
|
2769
|
+
* Defaults to "traefik".
|
|
2770
|
+
*/
|
|
2771
|
+
className: $addArgumentDescription(z.string().default("traefik"), `The name of the class to configure for ingress and gateway resources.
|
|
2772
|
+
|
|
2773
|
+
Defaults to "traefik".`)
|
|
2534
2774
|
},
|
|
2535
2775
|
inputs: {
|
|
2536
2776
|
...pick(sharedInputs2, ["k8sCluster"])
|
|
@@ -2551,6 +2791,36 @@ var traefik = defineUnit({
|
|
|
2551
2791
|
},
|
|
2552
2792
|
source: source("traefik")
|
|
2553
2793
|
});
|
|
2794
|
+
var valkey = defineUnit({
|
|
2795
|
+
type: "k8s.apps.valkey.v1",
|
|
2796
|
+
args: {
|
|
2797
|
+
...appName("valkey"),
|
|
2798
|
+
...pick(sharedArgs2, ["external"])
|
|
2799
|
+
},
|
|
2800
|
+
secrets: {
|
|
2801
|
+
...pick(sharedSecrets2, ["backupKey"])
|
|
2802
|
+
},
|
|
2803
|
+
inputs: {
|
|
2804
|
+
...pick(sharedInputs2, ["k8sCluster"]),
|
|
2805
|
+
...pick(optionalSharedInputs, ["resticRepo"])
|
|
2806
|
+
},
|
|
2807
|
+
outputs: {
|
|
2808
|
+
redis: databases_exports.redisEntity,
|
|
2809
|
+
service: serviceEntity,
|
|
2810
|
+
endpoints: {
|
|
2811
|
+
entity: l4EndpointEntity,
|
|
2812
|
+
multiple: true
|
|
2813
|
+
}
|
|
2814
|
+
},
|
|
2815
|
+
meta: {
|
|
2816
|
+
description: `The Valkey instance deployed on Kubernetes.`,
|
|
2817
|
+
title: "Valkey (Redis)",
|
|
2818
|
+
icon: "simple-icons:redis",
|
|
2819
|
+
secondaryIcon: "mdi:database",
|
|
2820
|
+
category: "Databases"
|
|
2821
|
+
},
|
|
2822
|
+
source: source("valkey/app")
|
|
2823
|
+
});
|
|
2554
2824
|
var vaultwarden = defineUnit({
|
|
2555
2825
|
type: "k8s.apps.vaultwarden.v1",
|
|
2556
2826
|
args: {
|
|
@@ -3630,6 +3900,14 @@ var existingImage = defineUnit({
|
|
|
3630
3900
|
var virtualMachine = defineUnit({
|
|
3631
3901
|
type: "proxmox.virtual-machine.v1",
|
|
3632
3902
|
args: {
|
|
3903
|
+
/**
|
|
3904
|
+
* The name of the virtual machine.
|
|
3905
|
+
*
|
|
3906
|
+
* If not specified, the unit name will be used.
|
|
3907
|
+
*/
|
|
3908
|
+
vmName: $addArgumentDescription(z.string().optional(), `The name of the virtual machine.
|
|
3909
|
+
|
|
3910
|
+
If not specified, the unit name will be used.`),
|
|
3633
3911
|
/**
|
|
3634
3912
|
* The name of the node to create the virtual machine on.
|
|
3635
3913
|
*
|
|
@@ -4776,6 +5054,14 @@ var connection3 = defineUnit({
|
|
|
4776
5054
|
var virtualMachine2 = defineUnit({
|
|
4777
5055
|
type: "timeweb.virtual-machine.v1",
|
|
4778
5056
|
args: {
|
|
5057
|
+
/**
|
|
5058
|
+
* The name of the virtual machine.
|
|
5059
|
+
*
|
|
5060
|
+
* If not provided, the name of the unit will be used.
|
|
5061
|
+
*/
|
|
5062
|
+
vmName: $addArgumentDescription(z.string().optional(), `The name of the virtual machine.
|
|
5063
|
+
|
|
5064
|
+
If not provided, the name of the unit will be used.`),
|
|
4779
5065
|
/**
|
|
4780
5066
|
* The ID of the preset to use for the virtual machine.
|
|
4781
5067
|
*
|
|
@@ -4829,46 +5115,94 @@ var virtualMachine2 = defineUnit({
|
|
|
4829
5115
|
// src/third-party/yandex.ts
|
|
4830
5116
|
var yandex_exports = {};
|
|
4831
5117
|
__export(yandex_exports, {
|
|
4832
|
-
cloudEntity: () => cloudEntity,
|
|
4833
5118
|
connection: () => connection4,
|
|
5119
|
+
connectionEntity: () => connectionEntity2,
|
|
5120
|
+
disk: () => disk,
|
|
5121
|
+
diskEntity: () => diskEntity,
|
|
5122
|
+
diskSchema: () => diskSchema,
|
|
5123
|
+
existingImage: () => existingImage2,
|
|
5124
|
+
imageEntity: () => imageEntity2,
|
|
4834
5125
|
virtualMachine: () => virtualMachine3
|
|
4835
5126
|
});
|
|
4836
|
-
var
|
|
4837
|
-
type: "yandex.
|
|
5127
|
+
var connectionEntity2 = defineEntity({
|
|
5128
|
+
type: "yandex.connection.v1",
|
|
4838
5129
|
schema: z.object({
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
5130
|
+
/**
|
|
5131
|
+
* The service account key file content (JSON).
|
|
5132
|
+
*/
|
|
5133
|
+
serviceAccountKeyFile: z.string().optional().meta({ title: camelCaseToHumanReadable("serviceAccountKeyFile"), description: `The service account key file content (JSON).` }),
|
|
5134
|
+
/**
|
|
5135
|
+
* The ID of the cloud.
|
|
5136
|
+
*/
|
|
5137
|
+
cloudId: z.string().meta({ title: camelCaseToHumanReadable("cloudId"), description: `The ID of the cloud.` }),
|
|
5138
|
+
/**
|
|
5139
|
+
* The default folder ID.
|
|
5140
|
+
*/
|
|
5141
|
+
defaultFolderId: z.string().meta({ title: camelCaseToHumanReadable("defaultFolderId"), description: `The default folder ID.` }),
|
|
5142
|
+
/**
|
|
5143
|
+
* The default availability zone.
|
|
5144
|
+
*/
|
|
5145
|
+
defaultZone: z.string().meta({ title: camelCaseToHumanReadable("defaultZone"), description: `The default availability zone.` }),
|
|
5146
|
+
/**
|
|
5147
|
+
* The region ID.
|
|
5148
|
+
*/
|
|
5149
|
+
regionId: z.string().optional().meta({ title: camelCaseToHumanReadable("regionId"), description: `The region ID.` })
|
|
4845
5150
|
}),
|
|
4846
5151
|
meta: {
|
|
4847
5152
|
color: "#0080ff"
|
|
4848
5153
|
}
|
|
4849
5154
|
});
|
|
4850
5155
|
var connection4 = defineUnit({
|
|
4851
|
-
type: "yandex.connection.
|
|
5156
|
+
type: "yandex.connection.v1",
|
|
4852
5157
|
args: {
|
|
4853
5158
|
/**
|
|
4854
|
-
* The
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
/**
|
|
4858
|
-
* The region ID for resources.
|
|
5159
|
+
* The region to create connection for.
|
|
5160
|
+
*
|
|
5161
|
+
* See [Regions](https://yandex.cloud/en/docs/overview/concepts/region) for details.
|
|
4859
5162
|
*/
|
|
4860
|
-
|
|
5163
|
+
region: $addArgumentDescription(z.discriminatedUnion("id", [
|
|
5164
|
+
z.object({
|
|
5165
|
+
/**
|
|
5166
|
+
* The ID of the region.
|
|
5167
|
+
*/
|
|
5168
|
+
id: z.literal("ru-central1").meta({ title: camelCaseToHumanReadable("id"), description: `The ID of the region.` }),
|
|
5169
|
+
/**
|
|
5170
|
+
* The default availability zone in ru-central1 to place resources in.
|
|
5171
|
+
*/
|
|
5172
|
+
defaultZone: z.enum(["ru-central1-a", "ru-central1-b", "ru-central1-d"]).default("ru-central1-d").meta({ title: camelCaseToHumanReadable("defaultZone"), description: `The default availability zone in ru-central1 to place resources in.` })
|
|
5173
|
+
}),
|
|
5174
|
+
z.object({
|
|
5175
|
+
/**
|
|
5176
|
+
* The ID of the region.
|
|
5177
|
+
*/
|
|
5178
|
+
id: z.literal("kz1").meta({ title: camelCaseToHumanReadable("id"), description: `The ID of the region.` }),
|
|
5179
|
+
/**
|
|
5180
|
+
* The default availability zone in kz1 to place resources in.
|
|
5181
|
+
*/
|
|
5182
|
+
defaultZone: z.enum(["kz1-a"]).default("kz1-a").meta({ title: camelCaseToHumanReadable("defaultZone"), description: `The default availability zone in kz1 to place resources in.` })
|
|
5183
|
+
})
|
|
5184
|
+
]).prefault({ id: "ru-central1" }), `The region to create connection for.
|
|
5185
|
+
|
|
5186
|
+
See [Regions](https://yandex.cloud/en/docs/overview/concepts/region) for details.`)
|
|
4861
5187
|
},
|
|
4862
5188
|
secrets: {
|
|
4863
5189
|
/**
|
|
4864
5190
|
* The service account key file content (JSON).
|
|
5191
|
+
*
|
|
5192
|
+
* Important: service account must have `iam.serviceAccounts.user` role to work properly.
|
|
5193
|
+
*
|
|
5194
|
+
* See [Creating an authorized key](https://yandex.cloud/en/docs/iam/operations/authentication/manage-authorized-keys#create-authorized-key) for details.
|
|
4865
5195
|
*/
|
|
4866
5196
|
serviceAccountKeyFile: $addArgumentDescription({
|
|
4867
5197
|
schema: z.string().meta({ language: "json" }),
|
|
4868
5198
|
meta: {
|
|
4869
5199
|
title: "Service Account Key File"
|
|
4870
5200
|
}
|
|
4871
|
-
}, `The service account key file content (JSON)
|
|
5201
|
+
}, `The service account key file content (JSON).
|
|
5202
|
+
|
|
5203
|
+
Important: service account must have \`iam.serviceAccounts.user\` role to work properly.
|
|
5204
|
+
|
|
5205
|
+
See [Creating an authorized key](https://yandex.cloud/en/docs/iam/operations/authentication/manage-authorized-keys#create-authorized-key) for details.`)
|
|
4872
5206
|
},
|
|
4873
5207
|
inputs: {
|
|
4874
5208
|
...inputs2
|
|
@@ -4877,11 +5211,11 @@ var connection4 = defineUnit({
|
|
|
4877
5211
|
/**
|
|
4878
5212
|
* The Yandex Cloud connection.
|
|
4879
5213
|
*/
|
|
4880
|
-
|
|
5214
|
+
connection: $addInputDescription(connectionEntity2, `The Yandex Cloud connection.`)
|
|
4881
5215
|
},
|
|
4882
5216
|
meta: {
|
|
4883
5217
|
description: `The connection to a Yandex Cloud account.`,
|
|
4884
|
-
title: "
|
|
5218
|
+
title: "YC Connection",
|
|
4885
5219
|
category: "Yandex Cloud",
|
|
4886
5220
|
icon: "simple-icons:yandexcloud",
|
|
4887
5221
|
iconColor: "#0080ff"
|
|
@@ -4891,13 +5225,164 @@ var connection4 = defineUnit({
|
|
|
4891
5225
|
path: "connection"
|
|
4892
5226
|
}
|
|
4893
5227
|
});
|
|
5228
|
+
var diskSchema = z.object({
|
|
5229
|
+
/**
|
|
5230
|
+
* The disk type.
|
|
5231
|
+
*
|
|
5232
|
+
* - Network SSD (network-ssd): Fast network drive; SSD network block storage.
|
|
5233
|
+
* - Network HDD (network-hdd): Standard network drive; HDD network block storage.
|
|
5234
|
+
* - Non-replicated SSD (network-ssd-nonreplicated): Enhanced performance network drive without redundancy.
|
|
5235
|
+
* - Ultra high-speed network storage with three replicas (SSD) (network-ssd-io-m3): High-performance SSD offering the same speed as network-ssd-nonreplicated, plus redundancy.
|
|
5236
|
+
*/
|
|
5237
|
+
type: z.enum(["network-ssd", "network-hdd", "network-ssd-nonreplicated", "network-ssd-io-m3"]).default("network-ssd").meta({ title: camelCaseToHumanReadable("type"), description: `The disk type.
|
|
5238
|
+
|
|
5239
|
+
- Network SSD (network-ssd): Fast network drive; SSD network block storage.
|
|
5240
|
+
- Network HDD (network-hdd): Standard network drive; HDD network block storage.
|
|
5241
|
+
- Non-replicated SSD (network-ssd-nonreplicated): Enhanced performance network drive without redundancy.
|
|
5242
|
+
- Ultra high-speed network storage with three replicas (SSD) (network-ssd-io-m3): High-performance SSD offering the same speed as network-ssd-nonreplicated, plus redundancy.` }),
|
|
5243
|
+
/**
|
|
5244
|
+
* The disk size in GB.
|
|
5245
|
+
*
|
|
5246
|
+
* For `network-ssd-nonreplicated` and `network-ssd-io-m3` must be multiple of 93.
|
|
5247
|
+
*/
|
|
5248
|
+
size: z.number().default(20).meta({ title: camelCaseToHumanReadable("size"), description: `The disk size in GB.
|
|
5249
|
+
|
|
5250
|
+
For \`network-ssd-nonreplicated\` and \`network-ssd-io-m3\` must be multiple of 93.` })
|
|
5251
|
+
});
|
|
5252
|
+
var diskEntity = defineEntity({
|
|
5253
|
+
type: "yandex.disk.v1",
|
|
5254
|
+
schema: z.object({
|
|
5255
|
+
/**
|
|
5256
|
+
* The global ID of the disk.
|
|
5257
|
+
*/
|
|
5258
|
+
id: z.string().meta({ title: camelCaseToHumanReadable("id"), description: `The global ID of the disk.` })
|
|
5259
|
+
}),
|
|
5260
|
+
meta: {
|
|
5261
|
+
title: "YC Disk",
|
|
5262
|
+
icon: "simple-icons:yandexcloud",
|
|
5263
|
+
iconColor: "#0080ff",
|
|
5264
|
+
secondaryIcon: "icon-park-outline:disk"
|
|
5265
|
+
}
|
|
5266
|
+
});
|
|
5267
|
+
var disk = defineUnit({
|
|
5268
|
+
type: "yandex.disk.v1",
|
|
5269
|
+
args: {
|
|
5270
|
+
/**
|
|
5271
|
+
* The name of the disk in the folder.
|
|
5272
|
+
* If not specified, the name of the unit will be used.
|
|
5273
|
+
*/
|
|
5274
|
+
diskName: $addArgumentDescription(z.string().optional(), `The name of the disk in the folder.
|
|
5275
|
+
If not specified, the name of the unit will be used.`),
|
|
5276
|
+
...diskSchema.shape
|
|
5277
|
+
},
|
|
5278
|
+
inputs: {
|
|
5279
|
+
connection: connectionEntity2
|
|
5280
|
+
},
|
|
5281
|
+
outputs: {
|
|
5282
|
+
/**
|
|
5283
|
+
* The disk entity.
|
|
5284
|
+
*/
|
|
5285
|
+
disk: $addInputDescription(diskEntity, `The disk entity.`)
|
|
5286
|
+
},
|
|
5287
|
+
meta: {
|
|
5288
|
+
description: `The disk on Yandex Cloud.`,
|
|
5289
|
+
title: "YC Disk",
|
|
5290
|
+
category: "Yandex Cloud",
|
|
5291
|
+
icon: "icon-park-outline:disk",
|
|
5292
|
+
iconColor: "#0080ff",
|
|
5293
|
+
secondaryIcon: "mage:compact-disk-fill"
|
|
5294
|
+
},
|
|
5295
|
+
source: {
|
|
5296
|
+
package: "@highstate/yandex",
|
|
5297
|
+
path: "disk"
|
|
5298
|
+
}
|
|
5299
|
+
});
|
|
5300
|
+
var imageEntity2 = defineEntity({
|
|
5301
|
+
type: "yandex.image.v1",
|
|
5302
|
+
schema: z.object({
|
|
5303
|
+
/**
|
|
5304
|
+
* The global ID of the image.
|
|
5305
|
+
*/
|
|
5306
|
+
id: z.string().meta({ title: camelCaseToHumanReadable("id"), description: `The global ID of the image.` })
|
|
5307
|
+
}),
|
|
5308
|
+
meta: {
|
|
5309
|
+
title: "Yandex Cloud Image",
|
|
5310
|
+
icon: "simple-icons:yandexcloud",
|
|
5311
|
+
iconColor: "#0080ff",
|
|
5312
|
+
secondaryIcon: "mage:compact-disk-fill"
|
|
5313
|
+
}
|
|
5314
|
+
});
|
|
5315
|
+
var existingImage2 = defineUnit({
|
|
5316
|
+
type: "yandex.existing-image.v1",
|
|
5317
|
+
args: {
|
|
5318
|
+
/**
|
|
5319
|
+
* The ID of the image.
|
|
5320
|
+
*
|
|
5321
|
+
* See [Yandex Cloud Marketplace Images](https://yandex.cloud/en/marketplace) to find available images and their IDs.
|
|
5322
|
+
* You can also use user images by specifying their IDs.
|
|
5323
|
+
*/
|
|
5324
|
+
id: $addArgumentDescription(z.string(), `The ID of the image.
|
|
5325
|
+
|
|
5326
|
+
See [Yandex Cloud Marketplace Images](https://yandex.cloud/en/marketplace) to find available images and their IDs.
|
|
5327
|
+
You can also use user images by specifying their IDs.`)
|
|
5328
|
+
},
|
|
5329
|
+
inputs: {
|
|
5330
|
+
connection: connectionEntity2
|
|
5331
|
+
},
|
|
5332
|
+
outputs: {
|
|
5333
|
+
/**
|
|
5334
|
+
* The image entity.
|
|
5335
|
+
*/
|
|
5336
|
+
image: $addInputDescription(imageEntity2, `The image entity.`)
|
|
5337
|
+
},
|
|
5338
|
+
meta: {
|
|
5339
|
+
description: `The existing image from Yandex Cloud Marketplace or user images.`,
|
|
5340
|
+
title: "YC Existing Image",
|
|
5341
|
+
category: "Yandex Cloud",
|
|
5342
|
+
icon: "simple-icons:yandexcloud",
|
|
5343
|
+
iconColor: "#0080ff",
|
|
5344
|
+
secondaryIcon: "mage:compact-disk-fill"
|
|
5345
|
+
},
|
|
5346
|
+
source: {
|
|
5347
|
+
package: "@highstate/yandex",
|
|
5348
|
+
path: "existing-image"
|
|
5349
|
+
}
|
|
5350
|
+
});
|
|
4894
5351
|
var virtualMachine3 = defineUnit({
|
|
4895
|
-
type: "yandex.virtual-machine.
|
|
5352
|
+
type: "yandex.virtual-machine.v1",
|
|
4896
5353
|
args: {
|
|
4897
5354
|
/**
|
|
4898
|
-
* The
|
|
5355
|
+
* The name of the virtual machine.
|
|
5356
|
+
* If not specified, the name of the unit will be used.
|
|
4899
5357
|
*/
|
|
4900
|
-
|
|
5358
|
+
vmName: $addArgumentDescription(z.string().optional(), `The name of the virtual machine.
|
|
5359
|
+
If not specified, the name of the unit will be used.`),
|
|
5360
|
+
/**
|
|
5361
|
+
* The platform ID for the instance.
|
|
5362
|
+
*
|
|
5363
|
+
* See [Platforms](https://yandex.cloud/en/docs/compute/concepts/vm-platforms) for details.
|
|
5364
|
+
*/
|
|
5365
|
+
platformId: $addArgumentDescription(z.enum([
|
|
5366
|
+
// standard platforms
|
|
5367
|
+
"standard-v1",
|
|
5368
|
+
"standard-v2",
|
|
5369
|
+
"standard-v3",
|
|
5370
|
+
"amd-v1",
|
|
5371
|
+
"standard-v4a",
|
|
5372
|
+
// high-performance platforms
|
|
5373
|
+
"highfreq-v3",
|
|
5374
|
+
"highfreq-v4a",
|
|
5375
|
+
// with gpu
|
|
5376
|
+
"gpu-standard-v1",
|
|
5377
|
+
"gpu-standard-v2",
|
|
5378
|
+
"gpu-standard-v3",
|
|
5379
|
+
"gpu-standard-v3i",
|
|
5380
|
+
"standard-v3-t4",
|
|
5381
|
+
"standard-v3-t4i",
|
|
5382
|
+
"gpu-platform-v4"
|
|
5383
|
+
]).default("standard-v3"), `The platform ID for the instance.
|
|
5384
|
+
|
|
5385
|
+
See [Platforms](https://yandex.cloud/en/docs/compute/concepts/vm-platforms) for details.`),
|
|
4901
5386
|
/**
|
|
4902
5387
|
* The resources to allocate to the virtual machine.
|
|
4903
5388
|
*/
|
|
@@ -4911,31 +5396,14 @@ var virtualMachine3 = defineUnit({
|
|
|
4911
5396
|
*/
|
|
4912
5397
|
memory: z.number().default(4).meta({ title: camelCaseToHumanReadable("memory"), description: `The amount of memory in GB.` }),
|
|
4913
5398
|
/**
|
|
4914
|
-
* The core
|
|
5399
|
+
* The guaranteed CPU core performance (10-100).
|
|
4915
5400
|
*/
|
|
4916
|
-
coreFraction: z.number().min(10).max(100).optional().meta({ title: camelCaseToHumanReadable("coreFraction"), description: `The core
|
|
5401
|
+
coreFraction: z.number().min(10).max(100).optional().meta({ title: camelCaseToHumanReadable("coreFraction"), description: `The guaranteed CPU core performance (10-100).` })
|
|
4917
5402
|
}).prefault({}), `The resources to allocate to the virtual machine.`),
|
|
4918
5403
|
/**
|
|
4919
5404
|
* The boot disk configuration.
|
|
4920
5405
|
*/
|
|
4921
|
-
|
|
4922
|
-
/**
|
|
4923
|
-
* The disk size in GB.
|
|
4924
|
-
*
|
|
4925
|
-
* For `network-ssd-nonreplicated` must be multiple of 93.
|
|
4926
|
-
*/
|
|
4927
|
-
size: z.number().default(20).meta({ title: camelCaseToHumanReadable("size"), description: `The disk size in GB.
|
|
4928
|
-
|
|
4929
|
-
For \`network-ssd-nonreplicated\` must be multiple of 93.` }),
|
|
4930
|
-
/**
|
|
4931
|
-
* The disk type.
|
|
4932
|
-
*/
|
|
4933
|
-
type: z.string().default("network-ssd-nonreplicated").meta({ title: camelCaseToHumanReadable("type"), description: `The disk type.` }),
|
|
4934
|
-
/**
|
|
4935
|
-
* The image family to use.
|
|
4936
|
-
*/
|
|
4937
|
-
imageFamily: z.string().default("ubuntu-2204-lts").meta({ title: camelCaseToHumanReadable("imageFamily"), description: `The image family to use.` })
|
|
4938
|
-
}).prefault({}), `The boot disk configuration.`),
|
|
5406
|
+
bootDisk: $addArgumentDescription(diskSchema.prefault({}), `The boot disk configuration.`),
|
|
4939
5407
|
/**
|
|
4940
5408
|
* The network configuration.
|
|
4941
5409
|
*/
|
|
@@ -4951,44 +5419,35 @@ var virtualMachine3 = defineUnit({
|
|
|
4951
5419
|
*/
|
|
4952
5420
|
assignPublicIp: z.boolean().default(true).meta({ title: camelCaseToHumanReadable("assignPublicIp"), description: `Whether to assign a public IP.` }),
|
|
4953
5421
|
/**
|
|
4954
|
-
*
|
|
5422
|
+
* Whether to reserve the public IP permanently.
|
|
5423
|
+
*
|
|
5424
|
+
* If not set, the public IP can be changed when the VM is stopped and started again.
|
|
5425
|
+
*
|
|
5426
|
+
* Makes no sense if `assignPublicIp` is false.
|
|
4955
5427
|
*/
|
|
4956
|
-
|
|
5428
|
+
reservePublicIp: z.boolean().default(true).meta({ title: camelCaseToHumanReadable("reservePublicIp"), description: `Whether to reserve the public IP permanently.
|
|
5429
|
+
|
|
5430
|
+
If not set, the public IP can be changed when the VM is stopped and started again.
|
|
5431
|
+
|
|
5432
|
+
Makes no sense if \`assignPublicIp\` is false.` })
|
|
4957
5433
|
}).prefault({}), `The network configuration.`),
|
|
4958
|
-
/**
|
|
4959
|
-
* The IPv4 address configuration.
|
|
4960
|
-
*/
|
|
4961
|
-
ipv4: $addArgumentDescription(z.discriminatedUnion("type", [
|
|
4962
|
-
z.object({
|
|
4963
|
-
type: z.literal("dhcp")
|
|
4964
|
-
}),
|
|
4965
|
-
z.object({
|
|
4966
|
-
type: z.literal("static"),
|
|
4967
|
-
address: z.string(),
|
|
4968
|
-
prefix: ipv4PrefixSchema.default(24),
|
|
4969
|
-
gateway: z.string().optional()
|
|
4970
|
-
})
|
|
4971
|
-
]).default({ type: "dhcp" }), `The IPv4 address configuration.`),
|
|
4972
5434
|
/**
|
|
4973
5435
|
* The SSH configuration.
|
|
4974
5436
|
*/
|
|
4975
|
-
ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration.`)
|
|
4976
|
-
/**
|
|
4977
|
-
* Additional metadata for cloud-init.
|
|
4978
|
-
*/
|
|
4979
|
-
metadata: $addArgumentDescription(z.record(z.string(), z.string()).default({}), `Additional metadata for cloud-init.`)
|
|
5437
|
+
ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration.`)
|
|
4980
5438
|
},
|
|
4981
5439
|
secrets: {
|
|
4982
5440
|
...vmSecrets
|
|
4983
5441
|
},
|
|
4984
5442
|
inputs: {
|
|
4985
|
-
|
|
5443
|
+
connection: connectionEntity2,
|
|
5444
|
+
image: imageEntity2,
|
|
4986
5445
|
...inputs2
|
|
4987
5446
|
},
|
|
4988
5447
|
outputs: serverOutputs,
|
|
4989
5448
|
meta: {
|
|
4990
5449
|
description: `The virtual machine on Yandex Cloud.`,
|
|
4991
|
-
title: "
|
|
5450
|
+
title: "YC Virtual Machine",
|
|
4992
5451
|
category: "Yandex Cloud",
|
|
4993
5452
|
icon: "simple-icons:yandexcloud",
|
|
4994
5453
|
iconColor: "#0080ff",
|