@k8ts/instruments
Version:
A collection of utilities and core components for k8ts.
54 lines (49 loc) • 1.32 kB
text/typescript
import { Embedder } from "../_embedder/base"
import { ResourceEntity } from "../graph/resource-node"
export interface ManifestMetadata {
labels: Record<string, string>
annotations: Record<string, string>
name: string
namespace?: string
}
export interface ManifestIdentFields {
kind: string
apiVersion: string
}
export interface BuilderInputTypes {
body: PreManifest
metadata?: ManifestMetadata
idents?: ManifestIdentFields
}
export type JsonSerializable =
| string
| number
| boolean
| null
| JsonSerializable[]
| { [key: string]: JsonSerializable }
export interface PreManifest {
metadata?: {
name?: string
namespace?: string
annotations?: Record<string, string>
labels?: Record<string, string>
}
}
export interface BaseManifest {
[key: string]: JsonSerializable
[key: number]: never
apiVersion: string
kind: string
metadata: {
name: string
namespace?: string
labels?: Record<string, string>
annotations?: Record<string, string>
}
}
export interface SpecManifest<T extends JsonSerializable> extends BaseManifest {
spec: T
}
export const ManifestSourceEmbedder = new Embedder<object, ResourceEntity>("ManifestSource")
export * from "./manifest-builder"