cdk8s-cli
Version:
This is the command line tool for Cloud Development Kit (CDK) for Kubernetes (cdk8s).
42 lines (41 loc) • 1.65 kB
TypeScript
import { CodeMaker } from 'codemaker';
import { JSONSchema4 } from 'json-schema';
import { GenerateOptions, ImportBase } from './base';
import { ApiObjectDefinition } from './codegen';
import { ImportSpec } from '../config';
export declare const DEFAULT_API_VERSION = "1.25.0";
export interface ImportKubernetesApiOptions {
/**
* The API version to generate.
*/
readonly apiVersion: string;
/**
* Do not import these types. Instead, represent them as "any".
*
* @default - include all types that derive from the root types.
*/
readonly exclude?: string[];
}
export declare class ImportKubernetesApi extends ImportBase {
private readonly options;
static match(importSpec: ImportSpec, argv: any): Promise<ImportKubernetesApiOptions | undefined>;
constructor(options: ImportKubernetesApiOptions);
get moduleNames(): string[];
protected generateTypeScript(code: CodeMaker, moduleName: string, options: GenerateOptions): Promise<void>;
}
/**
* Returns a map of all API objects in the spec (objects that have the
* 'x-kubernetes-group-version-kind' annotation).
*
* The key is the base name of the type (i.e. `Deployment`). Since API objects
* may have multiple versions, each value in the map is an array of type definitions
* along with version information.
*
* @see https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-versioning
*/
export declare function findApiObjectDefinitions(schema: JSONSchema4, prefix: string): ApiObjectDefinition[];
export interface GroupVersionKind {
readonly group: string;
readonly kind: string;
readonly version: string;
}