src/yaml
loadYaml
Load a Kubernetes object from YAML.Parameters
data - The YAML string to load.
opts - Optional YAML load options.
returnsThe deserialized Kubernetes object.
function loadYaml<T>(data: string, opts?: yaml.LoadOptions): T loadAllYaml
Load all Kubernetes objects from YAML.Parameters
data - The YAML string to load.
opts - Optional YAML load options.
returnsAn array of deserialized Kubernetes objects.
function loadAllYaml(data: string, opts?: yaml.LoadOptions): any[] dumpYaml
Dump a Kubernetes object to YAML.Parameters
object - The Kubernetes object to dump.
opts - Optional YAML dump options.
returnsThe YAML string representation of the serialized Kubernetes object.
function dumpYaml(object: any, opts?: yaml.DumpOptions): string