cdk8s-cli
Version:
This is the command line tool for Cloud Development Kit (CDK) for Kubernetes (cdk8s).
63 lines (62 loc) • 1.92 kB
TypeScript
import { CodeMaker } from 'codemaker';
import { JSONSchema4 } from 'json-schema';
import { TypeGenerator } from 'json2jsii';
export interface ApiObjectDefinition {
readonly fqn: string;
readonly group: string;
readonly version: string;
readonly kind: string;
readonly schema: JSONSchema4;
/**
* Is this is a custom resource (imported from a CRD) or a core API object?
*/
readonly custom: boolean;
readonly prefix?: string;
readonly suffix?: string;
}
/**
* Emits the header for a generated imports file.
*
* @param custom - whether the header is being emitted for a custom resource
* (imported from a CRD) or a core API object
*/
export declare function emitHeader(code: CodeMaker, custom: boolean): void;
export declare function getTypeName(custom: boolean, kind: string, version: string): string;
export declare function getConstructTypeName(def: ApiObjectDefinition): string;
export declare function getPropsTypeName(def: ApiObjectDefinition): string;
export declare function generateConstruct(typegen: TypeGenerator, def: ApiObjectDefinition): void;
/**
* Emit imports for generated helm construct
* @param code CodeMaker istance
*/
export declare function emitHelmHeader(code: CodeMaker): void;
/**
* Helm Object Definition
*/
export interface HelmObjectDefinition {
/**
* `values.schema.json` for the helm chart
*/
readonly schema: JSONSchema4 | undefined;
/**
* Chart name
*/
readonly chartName: string;
/**
* Chart url
*/
readonly chartUrl: string;
/**
* Chart version
*/
readonly chartVersion: string;
/**
* Chart dependencies
*/
readonly chartDependencies: string[];
/**
* Fully qualified name for the construct
*/
readonly fqn?: string;
}
export declare function generateHelmConstruct(typegen: TypeGenerator, def: HelmObjectDefinition): void;