Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the image-automation-controller preserve blank lines in yaml files? #844

Open
jammy-d opened this issue Feb 12, 2025 · 2 comments
Open

Comments

@jammy-d
Copy link

jammy-d commented Feb 12, 2025

When the image-automation-controller updates an image on a yaml file, it seems to have the default behaviour to remove any blank lines in the file.

In most manifests this may be fine, but the image-automation-controller is able to update non-manifest yaml files, e.g. .gitlab-ci.yml, docker-compose.yml, etc. For these files it is fairly common to have blank lines between structured blocks.

Is it currently possible, or would it be possible to have the image-automation-controller preserve these blank lines (and any general structure in the YAML file), so that it effectively only edits the lines that are intended to be edited?

@makkes
Copy link
Member

makkes commented Feb 14, 2025

We're pretty much depending on the upstream kyaml lib for this functionality and that doesn't have a way to preserve blank lines. I'd be more than happy if you would be able to raise a ticket with the kustomize project in this matter.

@jammy-d
Copy link
Author

jammy-d commented Feb 18, 2025

Thanks @makkes for the reply. I would like to raise the ticket on kustomize project. Is there any additional info, I can add to the ticket for when the image-automation-controller applies its changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants