Reads and parses Kubernetes JSON or YAML spec from the project. It swallows all exceptions, returning undefined if one occurs.
If the specPath
of the file ends with .yaml
or .yml
, the file
contents are parsed as YAML. Otherwise it is parsed as JSON.
Project to look for spec file in
Path of spec file to load
Parsed object if the spec was successfully read and parsed, undefined otherwise
Reads and parses Kubernetes JSON or YAML spec from the project.
If the specFile.path
of the file ends with .yaml
or .yml
, the file
contents are parsed as YAML. Otherwise it is parsed as JSON.
File object of spec file to load
Parsed object of the spec
Parses content string as Kubernetes JSON or YAML spec. It parses the file as YAML, since JSON is valid YAML.
String representation of Kubernetes spec
File path of Kubernetes spec file
Parsed object of the spec
Generated using TypeDoc
Read and parse either JSON or YAML file with basename
base
under.atomist/kubernetes
in project. This function looks forbase
.json,base
.yaml, and thenbase
.yml. If it successfully reads and parses one of them into a truthy value, it returns its parsed value. If there are mulitple files matching those it looks for, it does not overlay/merge the parsed values. It stops after the first successfully parsed file.