Files
kustomize/kyaml/yaml
Matthew Hughes 8aafbacd17 Fix null YAML values being replaced by "null"
Related issues:

* https://github.com/kubernetes-sigs/kustomize/issues/5031
* https://github.com/kubernetes-sigs/kustomize/issues/5171

After noting this behaviour was not present in
d89b448c74 a `git bisect` pointed to the
change 1b7db20504. The issue with that
change is that upon seeing a `null` node it would replace it with a node
whose value was equivalent but without a `!!null` tag. This meant that
one application of a patch would have the desired approach: the result
would be `null` in the output, but on a second application of a similar
patch the field would be rendered as `"null"`.

To avoid this, define a new attribute on `RNode`s that is checked before
clearing any node we should keep. The added
`TestApplySmPatch_Idempotency` test verifies this behaviour.

See also https://github.com/kubernetes-sigs/kustomize/pull/5365 for an
alternative approach
2024-03-09 17:31:35 +00:00
..
2022-03-31 19:02:19 -04:00
2020-11-20 17:55:20 -08:00
2021-02-11 15:34:16 -08:00
2019-11-07 09:16:27 -08:00
2022-10-06 05:38:18 +02:00
2020-12-15 12:21:27 +08:00
2022-03-31 11:37:26 -04:00