You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With work on Helm 3 progressing at a steady pace, are there any plans to make this plugin work with it? Currently it seems to not be functional and exits with this:
I'm willing to support it, but definitely appreciate it if anyone could take it and submit a PR :)
I'm sharing what I know for anyone interested.
Helm 3 seems to have a different go module name which allows us to import both helm v2 and v3 as go libraries and make helm-diff works against both versions of helm.
The part of the problem I thought difficult was how helm-diff should determine which version of helm the plugin was called by.
Fortunately, Helm v3 seems to pass a different set of envvars to plugins:
Hey guys,
Trying to use diff with helm 3 but does not work.
$ helm plugin install https://github.com/databus23/helm-diff --version helm3-beta3
...
Use "helm [command] --help" for more information about a command./plugins/helm-diff/bin: File name too long
Failed to install helm-diff
\tFor support, go to https://github.com/databus23/helm-diff.
Error: plugin install hook for "diff" exited with error
or
$ helm plugin install https://github.com/databus23/helm-diff --version master
...
Installed plugin: diff
$ helm version
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
$ helm plugin list
NAME VERSION DESCRIPTION
diff 3.0.0-rc.7 Preview helm upgrade changes as a diff
$ helm diff upgrade my-chart . --detailed-exitcode --allow-unreleased --namespace default
Error: context deadline exceeded
context deadline exceeded
Error: plugin "diff" exited with error
@bappr Hey! It doesn't fail with context deadline exceeded for me, at least. I'm wondering if you have connectivity issue with your k8s api? Does helm list work?
Error: context deadline exceeded
context deadline exceeded
Error: plugin "diff" exited with error
helm.go:76: [debug] plugin "diff" exited with error
However with a non-local chart -> it seems that my helm diff still rely on helm 2 (tiller). 🤨
$ helm diff upgrade my-release stable/postgresql
Error: Couldn't load repositories file (repository/repositories.yaml).
You might need to run `helm init` (or `helm init --client-only` if tiller is already installed)
Couldn't load repositories file (repository/repositories.yaml).
You might need to run `helm init` (or `helm init --client-only` if tiller is already installed)
Error: plugin "diff" exited with error
Activity
mumoshu commentedon Aug 9, 2019
I'm willing to support it, but definitely appreciate it if anyone could take it and submit a PR :)
I'm sharing what I know for anyone interested.
Helm 3 seems to have a different go module name which allows us to import both helm v2 and v3 as go libraries and make helm-diff works against both versions of helm.
The part of the problem I thought difficult was how helm-diff should determine which version of helm the plugin was called by.
Fortunately, Helm v3 seems to pass a different set of envvars to plugins:
v3: https://github.com/helm/helm/blob/97e7461e41455e58d89b4d7d192fed5352001d44/pkg/plugin/plugin.go#L217
v2: https://github.com/helm/helm/blob/0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085/pkg/plugin/plugin.go#L172
So basically helm-diff should be able to determine the version of helm by checking the existence of
TILLER_HOST.After that, helm-diff should create a v3-flavored Helm storage instance to obtain the Helm release to be processed for diff. Also fortunately we have a great example of code for creating v3 helm storage instance in
helm-2to3: https://github.com/hickeyma/helm-2to3/blob/f92469cdd5e2be44153ebbf10c26238e72fdbee8/pkg/v3/connect.go#L62Currently, helm-diff does this over API provided by Tiller.
helm-diff/cmd/helpers.go
Line 33 in 28e6832
helm-diff/cmd/release.go
Line 83 in 28e6832
karuppiah7890 commentedon Sep 7, 2019
@mumoshu Are you working on this? 😄
mumoshu commentedon Sep 7, 2019
@karuppiah7890 Yep. Please take a look at #149 😃
feat: Experimental support for Helm 3.0.0-beta.3
mumoshu commentedon Sep 7, 2019
FYI helm 3 needs helm/helm#6385 in order for
helm upgrade diff --detailed-exitcodeto work.databus23 commentedon Oct 25, 2019
I'm closing this now that #151 is merged and released
bakayolo commentedon Nov 14, 2019
Hey guys,
Trying to use
diffwith helm 3 but does not work.or
mumoshu commentedon Nov 14, 2019
@bappr Hey! It doesn't fail with
context deadline exceededfor me, at least. I'm wondering if you have connectivity issue with your k8s api? Doeshelm listwork?bakayolo commentedon Nov 14, 2019
@mumoshu yep it works
And I have upgraded my chart this morning.
Anyway I can get more logs?
mumoshu commentedon Nov 14, 2019
@bappr Could you run it with
--debuglikehelm --debug dfff ...?Also, does it work if you used a non-local chart?
bakayolo commentedon Nov 14, 2019
@mumoshu
With
--debugHowever with a non-local chart -> it seems that my
helm diffstill rely on helm 2 (tiller). 🤨