@norskvideo/ctl-product-template-schema 0.1.31 → 0.1.32
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/index.d.ts +10 -0
- package/index.js +16 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -55,6 +55,10 @@ export declare const ProductTemplateSideloadSchema: z.ZodObject<{
|
|
|
55
55
|
llmVenv: z.ZodOptional<z.ZodBoolean>;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
export type ProductTemplateSideload = z.infer<typeof ProductTemplateSideloadSchema>;
|
|
58
|
+
export declare const ProductTemplateHostTlsSchema: z.ZodObject<{
|
|
59
|
+
services: z.ZodArray<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type ProductTemplateHostTls = z.infer<typeof ProductTemplateHostTlsSchema>;
|
|
58
62
|
export declare const ProductTemplateAcceleratorSchema: z.ZodEnum<{
|
|
59
63
|
none: "none";
|
|
60
64
|
nvidia: "nvidia";
|
|
@@ -316,6 +320,9 @@ export declare const ProductTemplateManifestSchema: z.ZodObject<{
|
|
|
316
320
|
configPath: z.ZodString;
|
|
317
321
|
}, z.core.$strict>]>>;
|
|
318
322
|
}, z.core.$strict>>>;
|
|
323
|
+
hostTls: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
services: z.ZodArray<z.ZodString>;
|
|
325
|
+
}, z.core.$strip>>;
|
|
319
326
|
migration: z.ZodOptional<z.ZodObject<{
|
|
320
327
|
strategy: z.ZodEnum<{
|
|
321
328
|
overlap: "overlap";
|
|
@@ -551,6 +558,9 @@ export declare const ProductTemplateMaterialsSchema: z.ZodObject<{
|
|
|
551
558
|
configPath: z.ZodString;
|
|
552
559
|
}, z.core.$strict>]>>;
|
|
553
560
|
}, z.core.$strict>>>;
|
|
561
|
+
hostTls: z.ZodOptional<z.ZodObject<{
|
|
562
|
+
services: z.ZodArray<z.ZodString>;
|
|
563
|
+
}, z.core.$strip>>;
|
|
554
564
|
migration: z.ZodOptional<z.ZodObject<{
|
|
555
565
|
strategy: z.ZodEnum<{
|
|
556
566
|
overlap: "overlap";
|
package/index.js
CHANGED
|
@@ -191,6 +191,19 @@ export const ProductTemplateSideloadSchema = z
|
|
|
191
191
|
}),
|
|
192
192
|
})
|
|
193
193
|
.meta({ id: "ProductTemplateSideload", outputId: "ProductTemplateSideload" });
|
|
194
|
+
// The host's own TLS certificate, handed to a product's containers. WHY THIS
|
|
195
|
+
// EXISTS: norsk-ctl already holds the certificate the host is reached by, and a
|
|
196
|
+
// product that serves TLS itself (relays in a cluster talk HTTPS to each other,
|
|
197
|
+
// and later run QUIC listeners) needs the same identity rather than minting a
|
|
198
|
+
// self-signed one nobody trusts. Additive: an older runner ignoring the field
|
|
199
|
+
// still launches the product, which then simply has no certificate mounted.
|
|
200
|
+
export const ProductTemplateHostTlsSchema = z
|
|
201
|
+
.object({
|
|
202
|
+
services: z.array(z.string().min(1)).min(1).meta({
|
|
203
|
+
description: "Compose services that get the host certificate. Each must be a service in the template's own compose.yml. The runner mounts the certificate and key read-only at /etc/norsk-host-tls (cert.pem, key.pem) and sets NORSK_HOST_TLS_DIR=/etc/norsk-host-tls and NORSK_HOST_TLS_TRUSTED=true|false (true when the certificate is a real, browser-trusted one; false when the host's is self-signed). A host with no certificate mounts nothing and sets neither variable; the launch still goes ahead.",
|
|
204
|
+
}),
|
|
205
|
+
})
|
|
206
|
+
.meta({ id: "ProductTemplateHostTls", outputId: "ProductTemplateHostTls" });
|
|
194
207
|
// Placement requirements guidance (requirements-authoring.md). Each dimension
|
|
195
208
|
// the placer reasons over — capacity (vCPUs), cores, GPU, capabilities, host
|
|
196
209
|
// ports — is optionally declared with a `mode`:
|
|
@@ -337,6 +350,9 @@ export const ProductTemplateManifestSchema = z
|
|
|
337
350
|
description: "Host-port bindings whose value rides a product-template parameter. Opt-in per launch via the param value: absent = closed, 'auto' = allocate a free port from `preferred`, number = use it. When opened the port is published as a managed host binding and surfaced to the containers via compose interpolation. Alongside the per-param scalars the runner sets NORSK_ALLOCATED_PORTS: a JSON object keyed by param, each value {port, protocol, service?}, describing every opened port ('{}' when none opted in; unset when nothing is declared) — so a product needing the allocation as data maps one var instead of folding scalars into JSON via interpolation.",
|
|
338
351
|
}),
|
|
339
352
|
logs: ProductTemplateLogsSchema.optional(),
|
|
353
|
+
hostTls: ProductTemplateHostTlsSchema.optional().meta({
|
|
354
|
+
description: "Mount the host's TLS certificate and key, read-only, into the named compose services — for a product that serves TLS itself. Copied per launch, so a rotated certificate is picked up on relaunch. Absent = nothing mounted.",
|
|
355
|
+
}),
|
|
340
356
|
migration: ProductTemplateMigrationSchema.optional().meta({
|
|
341
357
|
description: "How a running instance may be moved between nodes. `strategy` is the strongest promise the product keeps: `overlap` (target started, then source stopped — both may produce briefly), `stopThenStart` (the default when absent — target prepared but not started, source stopped, target started), or `handover` (the job speaks the worker's migration socket and hands over at an exact position). A migrate request may down-grade to a safer strategy but never up-grade past the declaration. Only the manager reads this; the worker never does.",
|
|
342
358
|
}),
|