Open sa-spag opened 1 year ago
Potentially related: https://github.com/argoproj-labs/argocd-image-updater/issues/502
Would be really great to have the original file content retained, and the only replaced parts are changed. In our scenario when we write back to git helm values file for new tag, all the values become sorted and reformatted.
Need to check how to implement this in https://github.com/argoproj-labs/argocd-image-updater/blob/master/pkg/argocd/git.go#L338
Is your feature request related to a problem? Please describe. When the Image Updater updates a
.argocd-source-<appName>.yaml
orkustomiztion.yaml
file, it does not retain their indentation. For instance, it may generate the following diff:Describe the solution you'd like Instead, the Image Updater should retain the existing formatting.
It turns out the issue is pretty common for other projects that edit YAML (see issues linked to https://github.com/kubernetes-sigs/kustomize/issues/3946). Since version 0.11.1, kyaml enables retaining the source file indention (see https://github.com/kubernetes-sigs/kustomize/pull/4043). This feature has been integrated in Flux's Image Automation Controller (see https://github.com/fluxcd/image-automation-controller/pull/366), and I believe we can implement a similar feature for the Image Updater.
Describe alternatives you've considered None.
Additional context None.