premkumar bhaskal
premkumar bhaskal
@100mik this seems a valid ask, I think we should accept it.
@GUI Have you considered using a linting tool like yamllint? I will check if this is something viable to include in lib, and how unmarshalling currently handles duplicate because go...
So i finally got around to check this. Ytt is removing the duplicate keys and retaining only the last one [here](https://github.com/carvel-dev/ytt/blob/develop/pkg/workspace/template_loader.go#L171-L173). Plain yaml.v3 unmarshal rejects duplicate keys (https://go.dev/play/p/WEOlmjSJ0UQ) So I...
checking...
@deblaci I think your timestamp format is not correct (either it needs a timezone or a space between date and time). Which is the other yaml parser your are using...
and currently ytt cannot force quotes see https://kubernetes.slack.com/archives/CH8KCCKA5/p1688043220329239 and https://kubernetes.slack.com/archives/CH8KCCKA5/p1668521528903319.
@deblaci so strict yaml is only for parsing. mainly we use strictdecoder of yaml library to achieve this. there is no encoder for strict output generation.
@LittleWat What you are trying to achieve can be easily done using an overlay - template.yml ```yaml #@ load("@ytt:data", "data") conf: #@ data.values.test.optional_config ``` - default-schema.yml ```yaml #@data/values-schema --- test:...
you can even overlay data values instead of overlaying final results using below variant of val.yml - val.yml (overlay data-values) ```yaml #@ load("@ytt:overlay", "overlay") #@data/values #@overlay/match by=overlay.all --- test: optional_config:...
Also feel free to use / explore carvel channel on kubernetes slack. A question similar to yours is here - https://kubernetes.slack.com/archives/CH8KCCKA5/p1675159628085549