mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-02 09:21:13 +01:00
For config patching, it's beneficial to have some fields to be present in the config, even with the default (empty) value. At the same time not all fields should be present in all versions of the config, e.g. some config value don't apply to worker node configuration. Empty value and nil value are treated equal by `yaml` library, but Talos encoder can be made more smart to still output empty (non-nil) value to the config, while skipping completely nil fields. This PR implements that via new `talos:"omitonlyifnil"` tag and plus moves docs for such fields into comments under the value. GC'ed pod checkpointer config, so it doesn't get generated even as comments (it was empty by default even for 0.8, so this just removes comments about it). Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>