UNPKG

k8ts

Version:

Powerful framework for building Kubernetes manifests in TypeScript.

35 lines (31 loc) 778 B
import { Kind, Origin, relations } from "@k8ts/instruments" import { Meta } from "@k8ts/metadata" import { ManifestResource } from "../node" @relations("none") export class External<K extends Kind> extends ManifestResource { constructor( origin: Origin, readonly kind: K, name: string, namespace: string | undefined = undefined ) { super( origin, Meta.make({ name, namespace }), {} ) } manifestBody(): never { throw new Error("External resources cannot be manifested") } ref() { return { kind: this.kind.name, name: this.name, namespace: this.namespace } } }