-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Manifest comments are removed #2660
Comments
TL;DR: the problem is that there there isn't a YAML parser out there which is infallible at preserving comments. In order to update the manifests you need to: parse the manifests-> make modifications -> write the manifest back. To keep the comments you need a parser which preserves them (also called a roundtrip parser). Most of the YAML parsers are not roundtrip and the ones which are aren't infalible. The best parser we could find is
So, we cannot do much besides writing a YAML parser ourselves (for which we don't have the manpower) or wait until a better parser is made available (which is basically what we are doing). |
related: #1933 |
Manifests are allowed (and expected) to have comments now, with image-automation-controller in Flux v2, which uses an upstream Kustomize library, Ref: kubernetes-sigs/kustomize#3559, #3425, there are still issues with yaml reformatter not preserving things which folks want to have preserved (such as an extra indent in list syntax) but they can be addressed with upstreams now, and are not a responsibility of any software within the FluxCD org anymore. Flux v1 is in maintenance mode now, I will go ahead and close out this issue for now. |
Describe the bug
Comments in yaml manifests are removed when images are updated via a automated release
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
Comments should persist
Additional context
Add any other context about the problem here, e.g
flux:1.15.0
helm-operator:1.0.0-rc3
1.16.3
github enterprise
docker.io
The text was updated successfully, but these errors were encountered: