7/22/2023 0 Comments Kubernetes annotations exampleLike documents (and map items), an array item has exactly one (1) value. Arrays and Array Items ¶Īn “array” is a list of “array items” (zero-indexed). Let’s see what it looks like for a map item to have a map, itself.įigure 6: The document’s value is a map with two map items the second map item has a key of “metadata” and a value that is another map. Like documents, a map item has exactly one (1) value. Let’s zoom in on the first document, and explicitly reveal the contents of a map item:įigure 5: Each map item has a key and a value here, both map items' key is a string and their value is an integer. The complete tree of nodes looks like this:įigure 4: Corresponding tree: each document has a map for its value each map has two items. Each pair is referred to as a “map item”.įigure 3: Each document has a map (dotted green) each containing two map items (solid green). Maps are most common… Maps and Map Items ¶Ī “map” is collection of key-value pairs. The corresponding tree of nodes looks something like this:įigure 2: Corresponding tree: this document set has two documents.Ī given document has exactly one (1) value. Note: - marks the start of a new document. We’ll start from the top of the tree… Documents and Document Sets ¶Ī file containing text in YAML format is parsed into a Document Set: a collection of Documents.įigure 1: A file, parsed into a document set (dotted blue) containing two documents (solid blue). a Document Set (which is list of Documents).It can mitigate much of that frustration. what YAML is - its format and constituent parts and.And when they are, it can be rather frustrating. But in the shift from a free-form text file to a structured YAML document set, some of those expectations are foiled. It’s reasonable to have expectations of how to write templates, especially if we have prior experience. Templates in ytt - rather than being YAML-like text files with templating injected in - are well-formed YAML files with templating annotated on.
0 Comments
Leave a Reply. |