adding airgap install instructions#964
adding airgap install instructions#964MatthewFletcher wants to merge 5 commits intodatabus23:masterfrom
Conversation
|
@MatthewFletcher please fix ci issue. |
There was a problem hiding this comment.
Pull request overview
Adds support for “airgapped”/offline installation of the Helm Diff plugin by allowing the install hooks to use a locally-provided release tarball instead of downloading from GitHub, and documents the workflow in the README.
Changes:
- Add
HELM_DIFF_BIN_TGZsupport toinstall-binary.shto copy a local.tgzinstead of downloading it. - Add equivalent
HELM_DIFF_BIN_TGZsupport toinstall-binary.ps1for Windows installs. - Document offline installation steps in
README.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| install-binary.sh | Skips download-tool requirement and copies a local archive when HELM_DIFF_BIN_TGZ is set. |
| install-binary.ps1 | Supports offline install by copying a local archive when HELM_DIFF_BIN_TGZ is set. |
| README.md | Adds a new “Installing offline” section describing the environment variable and flow. |
…shell script formatting
…ng of the rest of the document
|
Realized my built in formatter was using different rules than |
| $archiveName = "helm-diff.tgz" | ||
| $arch = Get-Architecture | ||
| $version = Get-Version -Update $Update | ||
| $tmpDir = New-TemporaryDirectory |
There was a problem hiding this comment.
Offline installs still execute Get-Version, which runs git describe. In airgapped/offline environments (and when installing from a local plugin directory without git available), this can fail even though a local .tgz is provided. Consider deferring version detection (and any git usage) until the online branch, or making Get-Version return "latest" when $env:HELM_DIFF_BIN_TGZ is set.
| ### Installing offline | ||
| If installing this in an offline/airgapped environment, download the bin `.tgz` from [releases](https://github.com/databus23/helm-diff/releases). Set `HELM_DIFF_BIN_TGZ` to the absolute path to the bin `.tgz`: | ||
|
|
||
| **POSIX shell:** | ||
| ```sh | ||
| export HELM_DIFF_BIN_TGZ=/path/to/helm-diff-bin.tgz | ||
| ``` |
There was a problem hiding this comment.
The offline install docs say to download a “bin .tgz” but the release assets are platform-specific (e.g., helm-diff-<os>-<arch>.tgz) and the GitHub release page also includes source archives. Please clarify which exact asset to download to avoid users grabbing the source tarball or the wrong OS/arch package, and make the example filename match the actual release naming.
| $env:HELM_DIFF_BIN_TGZ = "C:\path\to\helm-diff-bin.tgz" | ||
| ``` | ||
|
|
||
| Now, run `helm plugin install /path/to/helm-diff/`. |
There was a problem hiding this comment.
These instructions end with helm plugin install /path/to/helm-diff/, but in offline scenarios it’s not obvious that you also need the plugin source directory (with plugin.yaml and install scripts) available locally (e.g., from a previously downloaded/cloned copy). Consider adding a brief note on obtaining the plugin directory offline so the steps are complete.
| Now, run `helm plugin install /path/to/helm-diff/`. | |
| Now, run `helm plugin install /path/to/helm-diff/`. | |
| Here, `/path/to/helm-diff/` must be a local copy of the Helm Diff plugin source directory (including `plugin.yaml` and the install scripts), for example from a repo you cloned or a source archive you downloaded earlier and transferred into the offline environment. |
Fixes #963
Per the issue,
helm plugin installfails if there is no connection to Github. I needed this to work for an offline installation.Also added readme update.
Now, by setting
HELM_DIFF_BIN_TGZin your shell to the path of the release .tgz file, installer will skip trying to grab from Github and use the local file instead.(Disclaimer: I did use LLM help to fix the ps1 script, as I'm not very fluent in powershell. Bash script updates were done by hand.)