-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data/values] Make '---' in values.yaml optional #167
Comments
it's required because |
So can ytt adds '---' implicitly for a values.yaml if it's not there? |
ytt knows that yaml document is data values is by finding documents with that annotation. file name itself (values.yml) isnt indicative that it contains data values. |
Hi @cppforlife, I meant when ytt reads a file my-data-values.yaml and finds |
something like this? #@data/values
foo: blah
other: another we could make it wrong however from more of a purist ytt perspective this isnt "conceptually valid" since @data/values annotation is only apply to |
I see what you meant. Does
as
|
there is no ambiguity in this case, but it goes against all other cases how annotations are set up in ytt (annotation never is applied to a parent node. only to self or children). it also seems that this is driven by a deficiencies in other tools. mikefarah/yq#351 (comment) seems to indicate that yq doesnt understand documents at all. |
We can put aside yq. One of the principle of ytt is that
|
ytt assigns the annotations to the following yaml node, which in this case is the map entry foo. Your example above would be the same as saying:
To apply the annotation to the implied document start would not make much sense. For example, users would expect:
to translate to
not
|
given above explanation from eli, ill close this issue. |
Is the '---' in values.yaml required? We hit an issue related to '---' and yq (see mikefarah/yq#351).
Without '---', ytt gives this error. But '---' is optional per yaml spec.
ytt: Error: Expected YAML document to be annotated with data/values but was *yamlmeta.MapItem
The text was updated successfully, but these errors were encountered: