k8ts
Version:
Powerful framework for building Kubernetes manifests in TypeScript.
49 lines • 2.46 kB
TypeScript
import { PortSet, ResourcesSpec, type CmdBuilder, type InputPortSetRecord, type Ref2_Of, type TaggedImage } from "@k8ts/instruments";
import type { CDK } from "@k8ts/sample-interfaces";
import { Resource_Child, Resource_Entity, Resource_Ref_Min, Resource_Top } from "@k8ts/instruments";
import type { Env_Leaf } from "../../../env/types";
import { v1 } from "../../../kinds/default";
import { type Container_Mount } from "./mounts";
declare const container_ResourcesSpec: ResourcesSpec<{
readonly cpu: "m";
readonly memory: "M" | "G" | "T" | "K" | "Mi" | "Gi" | "Ki";
}>;
type Container_Resources = (typeof container_ResourcesSpec)["__INPUT__"];
type Container_Mount_Some = Resource_Ref_Min<v1.Pod.Container.DeviceMount._ | v1.Pod.Container.VolumeMount._>;
export type Container_Mounts = {
[key: string]: Container_Mount_Some;
};
export interface Container_Env_From {
source: Ref2_Of<v1.ConfigMap._> | Ref2_Of<v1.Secret._>;
prefix?: string;
optional?: boolean;
}
export interface Container_Props<Ports extends string = never, _Env extends Record<string, Env_Leaf> = Record<string, Env_Leaf>> extends Omit<CDK.Container, "name"> {
$image: TaggedImage;
$ports?: InputPortSetRecord<Ports>;
$command?: CmdBuilder;
$mounts?: Container_Mounts;
$env?: _Env;
$envFrom?: Container_Env_From[];
$resources?: Container_Resources;
}
export declare class Container<Ports extends string = string> extends Resource_Child<Container_Props<Ports>> {
readonly subtype: "init" | "main";
readonly props: Container_Props<Ports>;
__PORTS__: Ports;
get kind(): import("@k8ts/instruments").Kind.SubKind<"Container", import("@k8ts/instruments").Kind.Kind<"", "v1", "Pod">>;
protected __needs__(): Record<string, Resource_Entity | Resource_Entity[] | undefined>;
get mounts(): {
mount: Container_Mount;
path: string;
}[];
get volumes(): (import("..").Pod_Device | import("..").Pod_Volume<import("..").Pod_Volume_Backend>)[];
get ports(): PortSet<Ports>;
protected __submanifest__(): CDK.Container;
constructor(parent: Resource_Entity, name: string, subtype: "init" | "main", props: Container_Props<Ports>);
private _groupedMounts;
private _resources;
}
export declare function make<Ports extends string>(parent: Resource_Top, name: string, subtype: "init" | "main", props: Container_Props<Ports>): Container<Ports>;
export {};
//# sourceMappingURL=container.d.ts.map