@atomist/sdm
Version:
Atomist Software Delivery Machine SDK
30 lines • 1.1 kB
TypeScript
import * as k8s from "@kubernetes/client-node";
import { KubernetesDelete } from "./request";
/**
* Use to be a workaround for
* https://github.com/kubernetes-client/javascript/issues/52 , now
* it is a no-op.
*/
export declare function metadataTemplate(partial?: k8s.V1ObjectMeta): k8s.V1ObjectMeta;
/**
* Tune the metadata returned by [[appMetadata]].
*/
export interface AppMetadataOptions {
/**
* If "cluster", do not set `namespace` property. If "namespace",
* do not set `namespace` property and set `name` to the value of
* `app.ns`. If "namespaced" or anything else, set `name` and
* `namespace` from the values in the `app`.
*/
ns?: "cluster" | "namespace" | "namespaced";
}
/**
* Generate the minimal metadata for the provided Kubernetes
* application.
*
* @param app Kubernetes application object
* @param opts optional tweaks to returned metadata
* @return valid Kubernetes resource metadata
*/
export declare function appMetadata(app: KubernetesDelete, opts?: AppMetadataOptions): k8s.V1ObjectMeta;
//# sourceMappingURL=metadata.d.ts.map