/** * Kubernetes cluster-tenant manifest renderer (DEC-067 / Scenario B of DEC-056). * * Where the sidecar renderer (DEC-058, Scenario A) injects an `h2a mcp-serve` * container into someone else's session Pod, the tenant renderer stands h2a up * as its own namespaced tenant with a shared **ReadWriteMany** store that * multiple Pods — potentially on different nodes — coordinate through. That * cross-Pod concurrency is only safe because the Deployment runs the store in * lease-lock mode (DEC-065/066) via `H2A_LOCK_MODE=lease`. * * The output is a complete multi-document manifest (Namespace + ResourceQuota * + PVC + Deployment) ready for `kubectl apply -f -`, not a fragment to merge. * * The renderer is pure: no I/O, no filesystem access. The caller decides * whether to print the YAML or write it to disk. */ export interface K8sTenantOptions { /** * Kubernetes namespace for the tenant. Default `h2a`. The namespace is * created by the manifest (a `Namespace` document is always emitted). */ readonly namespace?: string; /** * Image strategy: `"npm-runtime"` (default) installs the CLI from npm onto a * generic `node:22-alpine` base at Pod start; any other value is treated as a * concrete OCI reference (e.g. `"ghcr.io/rhanka/h2a-cli:0.1.28"`) that * already provides `h2a` on PATH. */ readonly image?: string; /** * Version pinned for the `npm i -g` line when `image = "npm-runtime"`. * Default `latest`. Pin to a known X.Y.Z for reproducible Pods. */ readonly cliVersion?: string; /** * Mount path for the shared store inside each Pod. Default `/workspace/.h2a`. */ readonly root?: string; /** * Number of coordinating Pods. Default 2 — the smallest replica count that * actually exercises cross-Pod locking (the whole point of Scenario B). */ readonly replicas?: number; /** * Requested size of the RWX PVC. Default `1Gi`. */ readonly storage?: string; /** * `storageClassName` for the PVC. Must back a ReadWriteMany volume. Default * unset (cluster default StorageClass); on Scaleway pass e.g. `"scw-bssd"`'s * RWX-capable class. Left unset so the manifest stays portable. */ readonly storageClass?: string; /** * Lease duration (ms) injected as `H2A_LEASE_MS`. Must exceed the longest * critical section plus inter-host clock skew. Default 30000 (DEC-065). */ readonly leaseMs?: number; /** * Per-Pod resource requests/limits. Conservative defaults. */ readonly resources?: { readonly requests?: { cpu?: string; memory?: string; }; readonly limits?: { cpu?: string; memory?: string; }; }; } export interface K8sTenantManifest { /** Structured documents in apply order (for programmatic consumers). */ readonly documents: ReadonlyArray>; /** Convenience: the rendered multi-document YAML. */ readonly yaml: string; } /** * Render a complete cluster-tenant manifest for Scenario B of DEC-056: a * namespaced h2a Deployment backed by a shared ReadWriteMany store whose * cross-Pod concurrency is made safe by the lease lock (DEC-065/066), turned * on through the `H2A_LOCK_MODE=lease` env the Deployment injects. */ export declare function renderK8sTenant(options?: K8sTenantOptions): K8sTenantManifest; //# sourceMappingURL=k8s-tenant.d.ts.map