-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Running on Windows fails #214
Comments
Hi, can you confirm, the environment variable Can you modify this line helm-secrets/scripts/wrapper/sh.cmd Line 2 in 480331a
to @echo on and re-run helm secrets, post the output here. |
@jkroepke the env variable After performing the change you suggested, unfortunately the result is exactly the same like before: Release "some-release" does not exist. Installing it now.
Error: fork/exec C:\Users\MY_USER\AppData\Roaming\helm\plugins\helm-secrets\scripts\run.sh: %1 is not a valid Win32 application. |
Based in the result you provided, it feels like helm does not execute the platformCommand for windows, instead just running the command. Lines 7 to 10 in 480331a
What happens, if you modify the plugin.yaml from command: "$HELM_PLUGIN_DIR/scripts/run.sh"
platformCommand:
- os: windows
command: "cmd /c $HELM_PLUGIN_DIR\\scripts\\wrapper\\sh.cmd $HELM_PLUGIN_DIR\\scripts\\run.sh" to command: "echo linux"
platformCommand:
- os: windows
command: "cmd /c echo windows" And post the output here? |
also same result .. I believe the issue is in the downloader part .. when I changed the downloader to: downloaders:
- command: "echo downloader" I got a different error as follows: Release "some-release" does not exist. Installing it now.
Error: exec: "C:\\Users\\MY_USER\\AppData\\Roaming\\helm\\plugins\\helm-secrets\\echo": file does not exist |
@jkroepke any idea? |
Using the wrapper instead the scheme based approach should work for you here. helm secrets upgrade --install some-release --namespace=whatever -f my-values.yaml -f secrets.yaml chart --version="x.y.z" --dry-run Something like
could be an alternative. |
Unfortunately neither the wrapper nor the change in the downloaders worked for me! Could that be related that my userfolder is containing a space? e.g. Using the wrapper:
Changing the downloaders:
|
Update: even that didn't help. |
Try
Yes, but this is an error on our side. If you could add |
Trying that gave me:
|
With |
with |
Sorry, I'm currently on a Mac. Reading https://stackoverflow.com/questions/6376113/how-do-i-use-spaces-in-the-command-prompt could help platformCommand:
- os: windows
command: 'cmd /c "$HELM_PLUGIN_DIR\\scripts\\wrapper\\sh.cmd" "$HELM_PLUGIN_DIR\\scripts\\run.sh"' OR platformCommand:
- os: windows
command: "cmd /c \"$HELM_PLUGIN_DIR\\scripts\\wrapper\\sh.cmd\" \"$HELM_PLUGIN_DIR\\scripts\\run.sh\"" |
The second one looked better but still ..
|
Whats wrong with first? |
has double backward slashes
|
What about
|
In meantime, here is the reason, why the space in the directory is the problem here: Helm splits the plugin command by space. None helm plugins will work, if the plugin path contains spaces here. This problem does also exists on linux, it's not a windows specific issue here. |
I looked also into the source code, while the wrapper approach would never work if the dir contains a spaces, I'm not sure why the this is my last idea 41132a2 in combination with the helm downloader |
@jkroepke I tried to apply the last changes you did in the commit, no luck unfortunately .. error:
|
Are you include the changes from the run.cmd? If yes, there is no chance from helm-secrets side do workaround this. |
yes I did and no it didn't work. Now I need something completely different and crazy .. I renamed my user to avoid spaces!! .. and then re-installed the plugin to have a fresh start. Real good news => the wrapper works perfectly fine e.g. Question => How can I get the protocol way
|
The wrapper works here, because helm provides a method to configure different command for different platforms. But this is not the case for downloader command. I guess, for windows, the
is still needed. What I did not test is register the .sh extension with the git bash. |
well .. I got a different error this time
|
@jkroepke I finally got it to work! The downloaders command should be: So to sum the solution up:
Do you probably want to add some docs about that? |
Can you at least try this 41132a2 ? Inside run.cmd, I added a
|
I tried your commit now .. again good news and bad news .. bad news first: trying something like
good news: when I do something like |
I see, change directory leads to unexpected behaivors... Can you check this? https://github.com/jkroepke/helm-secrets/pull/217/files |
Tried your PR results ..
I don't even have a line 7 .. seems like my Yaml file got mixed up with something .. |
Running helm with |
nothing useful at all :(
|
I update once again the .cmd files. Can you re-check it? You can install the version by
|
@jkroepke 🥳 🥳 great work! now working like a charm!! .. Thanks so much. Would you merge this PR? It wouldn't affect the currently working Linux versions, would it? |
It currently would breaks non windows setups |
Hmmm .. no chance to have a separate build for Windows or to have a way that's compatible with both? |
since there is only one entrypoint for both platforms, it must a one the could be parse by bash and cmd at the at the same time, including a unix shebang line.... I guess this does not exists |
#214 introduce a new command called |
Current Behavior
When I install the plugin using Helm on Windows (using a MINGW terminal) and I attempt to run my
helm
command, there's an error as follows:My Helm command after installing the plugin was something like:
helm upgrade --install some-release --namespace=whatever -f my-values.yaml -f secrets://secrets.yaml chart --version="x.y.z" --dry-run
Unfortunately the command terminates with the error message mentioned at the beginning.
To install the plugin I used:
I even tried the manual way like:
In both cases the installation seemed successfull and I could validate the plugin using e.g.:
$ helm plugin list NAME VERSION DESCRIPTION secrets 3.13.0 This plugin provides secrets values encryption for Helm charts secure storing
Expected Behavior
The plugin would work as expected!
Steps To Reproduce
No response
Environment
version.BuildInfo{Version:"v3.8.2", GitCommit:"6e3701edea09e5d55a8ca2aae03a68917630e91b", GitTreeState:"clean", GoVersion:"go1.17.5"}
3.13.0
Windows
MINGW
Anything else?
No response
The text was updated successfully, but these errors were encountered: