Skip to content

adding airgap install instructions#964

Open
MatthewFletcher wants to merge 5 commits intodatabus23:masterfrom
MatthewFletcher:master
Open

adding airgap install instructions#964
MatthewFletcher wants to merge 5 commits intodatabus23:masterfrom
MatthewFletcher:master

Conversation

@MatthewFletcher
Copy link
Copy Markdown

@MatthewFletcher MatthewFletcher commented Mar 26, 2026

Fixes #963
Per the issue, helm plugin install fails 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_TGZ in 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.)

@yxxhero yxxhero requested a review from Copilot March 28, 2026 10:15
@yxxhero
Copy link
Copy Markdown
Collaborator

yxxhero commented Mar 28, 2026

@MatthewFletcher please fix ci issue.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_TGZ support to install-binary.sh to copy a local .tgz instead of downloading it.
  • Add equivalent HELM_DIFF_BIN_TGZ support to install-binary.ps1 for 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.

@MatthewFletcher
Copy link
Copy Markdown
Author

Realized my built in formatter was using different rules than shfmt. Script should be formatted correctly now.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment on lines 56 to 59
$archiveName = "helm-diff.tgz"
$arch = Get-Architecture
$version = Get-Version -Update $Update
$tmpDir = New-TemporaryDirectory
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +30
### 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
```
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
$env:HELM_DIFF_BIN_TGZ = "C:\path\to\helm-diff-bin.tgz"
```

Now, run `helm plugin install /path/to/helm-diff/`.
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
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 this pull request may close these issues.

helm plugin install fails with no internet connection

3 participants