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

Windows Helm Diff path issue #316

Closed
sbugalski opened this issue Nov 24, 2021 · 9 comments · May be fixed by #712
Closed

Windows Helm Diff path issue #316

sbugalski opened this issue Nov 24, 2021 · 9 comments · May be fixed by #712

Comments

@sbugalski
Copy link

sbugalski commented Nov 24, 2021

Hello,

I've just found Helm Diff and installed on my Windows 10 pc using helm plugin install https://github.com/databus23/helm-diff

Calling helm diff from terminal ends like this

helm diff
Error: exec: "C:\\Users\\sb\\AppData\\Roaming\\helm\\plugins\\helm-diff/bin/diff": file does not exist

Helm installed from Chocolatey

helm plugin list
NAME    VERSION DESCRIPTION
diff    3.1.3   Preview helm upgrade changes as a diff


helm version
version.BuildInfo{Version:"v3.7.1", GitCommit:"1d11fcb5d3f3bf00dbe6fe31b8412839a96b3dc4", GitTreeState:"clean", GoVersion:"go1.16.9"}
@srilumpa
Copy link

srilumpa commented Dec 6, 2021

I also have the following error while installing the plugin in version 3.1.3:

> helm plugin install https://github.com/databus23/helm-diff
Error: exec: "sh": executable file not found in %PATH%

This is related to helm/helm#7117.

@srilumpa
Copy link

srilumpa commented Dec 7, 2021

To install the help-diff plugin on Windows:

  1. download the latest release built for Windows (currently: version 3.1.3)
  2. extract the archive
  3. copy the content of the diff extracted folder to $APPDATA$\helm\plugins\helm-diff
  4. check if its properly recognized by helm using helm.exe diff version (for example)

@DaWy
Copy link

DaWy commented Dec 15, 2021

To install the help-diff plugin on Windows:

  1. download the latest release built for Windows (currently: version 3.1.3)
  2. extract the archive
  3. copy the content of the diff extracted folder to $APPDATA$\helm\plugins\helm-diff
  4. check if its properly recognized by helm using helm.exe diff version (for example)

Not working for me. Its saying the same as OP:

image

@srilumpa
Copy link

That's because there is a space in your path. Check your helm configuration or the plugin's one to identify and fix the issue, but I don't know how to do this

@mumoshu
Copy link
Collaborator

mumoshu commented Jan 9, 2022

As @srilumpa has mentioned in the prev comment, helm/helm#7117 seems to indicate that helm plugins isn't supported on Windows (yet).

In the meantime, you would be able to run the plugin directly, by cloning the repo and running go build . to build a executable named helm-diff, which can be run directly by providing some envvars that are normally populated by helm, like

HELM_NAMESPACE=default HELM_BIN=helm ./helm-diff upgrade -h

Let me close this as answered and there isn't actionable from the helm-diff side. But please feel free to report back here if the direct run workaround doesn't work.

@mumoshu mumoshu closed this as completed Jan 9, 2022
@alastairs
Copy link

I had a need to run helm-diff as part of a helmfile deployment, which wasn't able to use the direct run workaround. I was able to resolve this by copying the built helm-diff.exe to %APPDATA%\helm\plugins\helm-diff\bin\diff.exe. YMMV.

I don't really understand all the moving parts here, but given a Windows build is published in the latest release and other helm plugins have managed to support Windows installation (e.g. helm-secrets) via helm plugin install, perhaps this plugin could too?

@plain5
Copy link

plain5 commented Nov 16, 2023

My workaround

  • Install helm-diff using the helm plugin command (do not pay attention to the output errors) :
helm plugin install https://github.com/databus23/helm-diff
  • Navigate to the C:\Users\YOUR_USER\AppData\Roaming\helm\plugins\helm-diff and manually create the bin folder.

  • Download desired release for Windows and extract from the archive diff.exe.

  • Move extracted diff.exe inside the C:\Users\YOUR_USER\AppData\Roaming\helm\plugins\helm-diff\bin folder.

  • Run helm diff to verify all work well.

  • Happy Diffing!

@rami-foo
Copy link

I think the support has been added recently so can the plugin add the windows support too?

@yxxhero
Copy link
Collaborator

yxxhero commented Dec 19, 2024

ok

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

Successfully merging a pull request may close this issue.

8 participants