fix: Windows install support and Helm 3.18+ compatibility - #256
Open
blaisemGH wants to merge 2 commits into
Open
fix: Windows install support and Helm 3.18+ compatibility#256blaisemGH wants to merge 2 commits into
blaisemGH wants to merge 2 commits into
Conversation
install.sh maps MINGW/MSYS to lowercase 'windows' but GoReleaser uses title-case 'Windows', so the download URL 404s. It also unconditionally uses tar, but GoReleaser produces .zip for Windows. Separately, the downloaders 'args' field in plugin.yaml doesn't exist in Helm 3's Downloaders struct. Helm 3.18+ strict-unmarshals plugin.yaml, so this is a fatal parse error. Fix the case, add zip/unzip handling, and switch the downloaders command to bin/helm-gcs-getter (the purpose-built getter binary). This drops the need for 'args' and works cross-platform. The root install script now also downloads helm-gcs-getter since it's needed. Tested on Windows 11 (MINGW64/Git Bash): - helm plugin install from git URL on Helm 3.18.2 and Helm 4.1.3 - helm plugin list (no warnings on stdout) - helm gcs init/push/rm subcommands via helm gcs --help - helm repo add with a gs:// bucket URL on Helm 3.18.2
Replace legacy command/hooks with platformCommand/platformHooks including os:windows entries that invoke powershell.exe instead of sh. This removes the requirement for Git Bash (sh.exe) on Windows. - Add scripts/install.ps1 as the Windows-native bootstrap installer (PowerShell 5.1 compatible, shipped with all Windows versions) - Use HELM_BIN env var for Helm version detection instead of bare 'helm', preventing misdetection when multiple Helm versions exist - Convert root plugin.yaml to use platformCommand/platformHooks (supported by both Helm 3 and Helm 4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
install.sh maps MINGW/MSYS to lowercase 'windows' but GoReleaser uses title-case 'Windows', so the download URL 404s. It also unconditionally uses tar, but GoReleaser produces .zip for Windows.
Separately, the downloaders 'args' field in plugin.yaml doesn't exist in Helm 3's Downloaders struct. Helm 3.18+ strict-unmarshals plugin.yaml, so this is a fatal parse error.
This change fixes the casing on 'windows', adds zip/unzip handling, and switches the downloaders command to bin/helm-gcs-getter (the purpose-built getter binary). This drops the need for 'args' and works cross-platform. The root install script now also downloads helm-gcs-getter since it's needed.
Originally (first commit), this PR relied on git bash for Windows users to run the install shell script. But when I tested this with a colleague on Windows, his git bash wasn't in his PATH, and it failed on the shell script. Given git bash apparently isn't that reliable on Windows, the second commit replaces the install scripts for windows with powershell scripts, which will 100% be in the PATH on windows machines. It worked for me and my colleague.