Commit Graph

6 Commits

Author SHA1 Message Date
Khris Richardson
fcfe798b75 convert tests to exercise openapi and inference 2020-03-03 18:50:02 -08:00
Phillip Wittrock
5d1a0346b5 Use OpenAPI when merging (3way) resources
- When merging (3way) resources use the patch strategy from the openAPI if the definition exists for the field
- Allow disabling of guessing patch strategy merge keys when no definition exists
- Support defining strategy and key directly on configuration fields through line and header coments
- Support attaching schema to parent fields of lists, and propagating -- e.g. that a field is a PodTemplate
2020-03-02 20:56:53 -08:00
Phillip Wittrock
98431f6a00 fix kyaml issue where dropping Style created issues
dropping the node style creates a compatibility issue where quotes around "on" are dropped
because yaml.v3 interprets it as a string.

other yaml parsers interpret on as a bool value, and parse it as a bool rather than string.

fix: retain the original style so it is kept as quoted.

- fmt: don't drop the styles
- merge2: keep the style when merging elements
- setting a field: if changing the value of a scalar field, retain its style by default
2019-12-19 20:25:31 -08:00
Phillip Wittrock
4312ab3f4d Fix panic in merge2 comment merging 2019-12-11 19:05:51 -08:00
Phillip Wittrock
3345464b25 kyaml: refactor command documentation into .md files from go files
No new documentation added.
2019-11-22 12:22:25 -08:00
Phillip Wittrock
efd7c8e3f7 kyaml: initial support for yaml and resource manipulation 2019-11-04 11:36:35 -08:00