image-automation-controller icon indicating copy to clipboard operation
image-automation-controller copied to clipboard

Image Automation Controller is reformatting inline blocks in a single line (Flux 2.2.0)

Open ruiengana opened this issue 1 year ago • 12 comments

related to https://github.com/fluxcd/image-automation-controller/issues/528

@stefanprodan we just upgraded to Flux 2.2.0 and problem is still occurring.

All our HelmRelease files getting picked up by the Image Automation Controller are getting inline blocks reformatted to single line blocks.

When a HelmRelease manifest has a block configuration like below and is updated by image automation controller, blocks are overwritten as a single line of code making it unreadable. Code blocks should not be reformatted.

For example, this is pipe block

  config: |
    _format_version: "2.1"
    _transform: true
    services:
    - name: example
      url: https://example.org
      routes:
      - name: example
        paths:
        - /example

After image automation controller commit becomes

  config: "_format_version: \"2.1\"\n    _transform: true\n    services:\n    - name: example\n      url: https://example.org\n      routes:\n      - name: example\n        paths:\n        - /example\n"

This behaviour is unexpected, we would like blocks to stay exactly as they were before.

ruiengana avatar Dec 14 '23 14:12 ruiengana