kyaml in k8s yaml definition
As we are moving away from yaml to kyaml. The code snippet here shows the differences and what sort of conversion we are looking at.
What changed between them
| YAML | KYAML | |
|---|---|---|
| Structure | Indentation decides nesting | Explicit { } and [ ], so whitespace no longer matters. Look at ports and env sections |
| String values | Quotes are optional and inconsistent | Always double-quoted |
| Keys | Quoted or unquoted | Unquoted |
| Commas | None | Present, including a trailing comma after the last item |
| Header | None | Leading ---, so it can’t be mistaken for broken JSON |
| Comments | Allowed | Still allowed (JSON can’t do this) |

Comments