You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal is to have overlayed data/values that result in a dictionary of objects. Then, I apply an operation to replace missing fields in each of those sub-objects by a default object, also defined in the overlayed data/values. It works well, however I can't specify the usual overlay annotations, as #@overlay/replace for the arrays.
#@ load("@ytt:data", "data")#@ load("@ytt:overlay", "overlay")#@ default = data.values.root.defaultroot: #@ {k: overlay.apply(default, v) for k, v in dict(data.values.root).items() if k != "default"}
The result :
root:
high:
x: 5"y": 2array:
# Here the items are appended
- 300
- 400
- 600low:
x: 1"y": -1array:
- 300
- 400
@Hugal31 Hi, sorry for the late reply. Just curious, do you still need help to resolve this issue or you found a workaround? Kindly let us know. Thanks
Edit: I think using overlay for this kind of task is not doable. The overlay annotation are consumed by the first overlay application (when merging my *.values.yaml). I'll close the issue.
My goal is to have overlayed data/values that result in a dictionary of objects. Then, I apply an operation to replace missing fields in each of those sub-objects by a default object, also defined in the overlayed data/values. It works well, however I can't specify the usual overlay annotations, as
#@overlay/replace
for the arrays.I have those two files:
test.values.yaml
and test.yaml:
The result :
Expected result:
How can I achieve this?
The text was updated successfully, but these errors were encountered: