Weird diff behaviour with line endings
I constantly see these changes in helmfile diff:
- apiVersion: v1
- kind: Namespace
- metadata:
- name: istio-system
- labels:
- sidecar.istio.io/inject: "false"
+ apiVersion: v1
+ kind: Namespace
+ metadata:
+ name: istio-system
+ labels:
+ sidecar.istio.io/inject: "false"
istio-injection: disabled << this last line is always okay across all files
these only happen when I run helmfile apply in the pipeline after running it locally (or vice versa). all of the files located in the repo display this behaviour. all the external charts - dont.
I'm using the same container locally and in the pipeline ( 4c74356b41/helmfile:azure ). LF is enforced on files everywhere. this might be related to https://github.com/databus23/helm-diff/issues/144 (it is not released yet I built it locally, but I observe the same behaviour).
Any ideas\pointers?
Same here, very annoying...
Same thing, please help ❤️🩹
I dream that someone will finally fix it
Since the diff plugin added an option to ignore the line endings (--strip-trailing-cr ), is there something that blocks an implementation/adaptation for helmfile?
@nerumo I tried looking at helmfile code, but its a bit over my head (never worked with Go), so I'm not sure how easy it is to implement it? I think its not possible to pass arguments to the plugin, only to helm? ie when I do:
helmfile apply --strip-trailing-cr
it complains - its not found
okay, i think you can do this:
helmfile diff --args='--strip-trainling-cr'
but it still reports every resource as changed, but doesn't show any diff, ie like so:
default, istio-system, Namespace (v1) has changed:
# Source: cluster-base/templates/01-namespaces.yaml
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
sidecar.istio.io/inject: "false"
istio-injection: disabled
no red or green, no + or - (both using helmfile diff and helm diff xxx)
it works now with the latest version:
helmfile diff --args='--strip-trailing-cr'
think we can close it now
This doen't work in all cases, I believe it fails when using local helm charts in a different directory, as for me it crashes when trying to execute helm dependency build <pathToChart> --strip-trailing-cr.
We've moved to https://github.com/helmfile/helmfile. It would be great if you could submit a pull request there to add helmfile diff --strip-trailing-cr!