Closed maudrid closed 1 year ago
Hi @maudrid, thanks for reaching out.
This can be solved by using an overlay/match annotation #@overlay/match missing_ok=True
above each new value in the settings.yml file. For your reference, I am attaching screenshots of these examples ran in ytt playground as well. Please let us know if this helps. We have Carvel’s slack channel too if you would like to join #carvel in Kubernetes
Also, Here are some docs using overlays and playground example to help you get started.
Thanks very much for the help.
Hi. I'm very new to ytt and I hope someone can point me in the right direction. I'm trying to do something seemingly simple, but I'm not able to get it to work. I have created a config.yml and I have a data1.yml. I can then use
#@ load("@ytt:data", "data")
and reference the values ex:attribute1: #@ data.values.att1
and this works. Some of the values that I have this the data1.yml, I want to place in a different file for maintenance purposes, now I have 3 files: config.ymldata1.yml
data2.yml
This produces the following error:
I understand that it is trying to overlay the 2 data files, but that is not what I want. I can add
att2
to the data1.yml file to remove this error, but that defeats what I set out to do.That being said, maybe I'm using this all wrong in the firs place. Here is a real example of why I'm trying to do this: config.yml
labels.yml
settings.yml
So I would not want to mix the values from the labels and the settings files. Since the settings will change all the time and the labels are static. But by using labels as data, I can maintain one copy of labels.