Skip to content

Support for installation with Helm3 #260

Closed

Description

@Vaishnavi109

We are trying to install the plugin with helm3 but it fails.

Activity

  1. deiga commented on Feb 14, 2021

    @deiga
    Contributor

    @Vaishnavi109 How does it fail? Can you provide output, logs, error message?

    The plugin works perfectly fine with helm3, so it is most likely something on your end.

  2. immerrr commented on Feb 25, 2021

    @immerrr

    @deiga you are right in that the plugin works with Helm 3. However, I did have to spend a couple of hours yesterday trying to install the plugin on a clean alpine docker image without git.

    $ helm plugin install https://github.com/databus23/helm-diff
    Error: git is not installed
    

    There were a couple of problems. Firstly, a tarball from the release page could not be installed:

    $ wget https://github.com/databus23/helm-diff/releases/download/v3.1.3/helm-diff-linux.tgz
    --2021-02-25 12:07:22--  https://github.com/databus23/helm-diff/releases/download/v3.1.3/helm-diff-linux.tgz
    Resolving github.com (github.com)... 140.82.121.4
    Connecting to github.com (github.com)|140.82.121.4|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github-releases.githubusercontent.com/83623770/b6d8f800-dede-11ea-894b-79a5552fe177?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210225%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210225T110709Z&X-Amz-Expires=300&X-Amz-Signature=e22c6b22668c79869c87d01f2f26bb8cddba7c8a677398e1f859b60112765cca&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=83623770&response-content-disposition=attachment%3B%20filename%3Dhelm-diff-linux.tgz&response-content-type=application%2Foctet-stream [following]
    --2021-02-25 12:07:22--  https://github-releases.githubusercontent.com/83623770/b6d8f800-dede-11ea-894b-79a5552fe177?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210225%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210225T110709Z&X-Amz-Expires=300&X-Amz-Signature=e22c6b22668c79869c87d01f2f26bb8cddba7c8a677398e1f859b60112765cca&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=83623770&response-content-disposition=attachment%3B%20filename%3Dhelm-diff-linux.tgz&response-content-type=application%2Foctet-stream
    Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.111.154, 185.199.110.154, 185.199.108.154, ...
    Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.111.154|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 15629982 (15M) [application/octet-stream]
    Saving to: ‘helm-diff-linux.tgz’
    
    helm-diff-linux.tgz                             100%[=====================================================================================================>]  14.91M  3.06MB/s    in 4.7s    
    
    2021-02-25 12:07:27 (3.15 MB/s) - ‘helm-diff-linux.tgz’ saved [15629982/15629982]
    
    $ helm plugin install ./helm-diff-linux.tgz 
    Error: plugin metadata (plugin.yaml) missing
    

    Apparently, it happens because the tarball has to have plugin.yaml at the root of the archive, and not in a subdir, but I didn't confirm that.

    Next, if you unpack the tarball and try to install it from a directory, it fails, because plugin.yaml references a hook, install-binary.sh, hook, that is not included in the archive:

    $ helm plugin install --debug .
    [debug] local_installer.go:49: symlinking /home/immerrr/src/helm-diff/diff to /home/immerrr/.local/share/helm/plugins/diff
    plugin_install.go:82: [debug] loading plugin from /home/immerrr/.local/share/helm/plugins/diff
    plugin.go:61: [debug] running install hook: /bin/sh -c $HELM_PLUGIN_DIR/install-binary.sh
    sh: 1: /home/immerrr/.local/share/helm/plugins/diff/install-binary.sh: not found
    Error: plugin install hook for "diff" exited with error
    helm.go:81: [debug] plugin install hook for "diff" exited with error
    main.runHook
    	/home/circleci/helm.sh/helm/cmd/helm/plugin.go:68
    main.(*pluginInstallOptions).run
    	/home/circleci/helm.sh/helm/cmd/helm/plugin_install.go:88
    main.newPluginInstallCmd.func3
    	/home/circleci/helm.sh/helm/cmd/helm/plugin_install.go:59
    github.com/spf13/cobra.(*Command).execute
    	/go/pkg/mod/github.com/spf13/[email protected]/command.go:842
    github.com/spf13/cobra.(*Command).ExecuteC
    	/go/pkg/mod/github.com/spf13/[email protected]/command.go:950
    github.com/spf13/cobra.(*Command).Execute
    	/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
    main.main
    	/home/circleci/helm.sh/helm/cmd/helm/helm.go:80
    runtime.main
    	/usr/local/go/src/runtime/proc.go:203
    runtime.goexit
    	/usr/local/go/src/runtime/asm_amd64.s:1373
    

    The install hook is likely not packaged because the tarball already has the binary, but it is not reflected in plugin.yaml. So in the end my installation script looked something like this:

    wget https://github.com/databus23/helm-diff/releases/download/v${HELM_DIFF_VERSION}/helm-diff-linux.tgz -O /tmp/helm-diff-linux.tgz \
        && tar -xvzf /tmp/helm-diff-linux.tgz -C /tmp \
        && mv /tmp/diff /path/to/helm-diff-plugin \
        && touch /path/to/helm-diff-plugin/install-binary.sh \
        && chmod +x /path/to/helm-diff-plugin/install-binary.sh \
        && helm plugin install /path/to/helm-diff-plugin
    
  3. stale commented on Jun 2, 2021

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  4. ncasaux commented on Nov 26, 2023

    @ncasaux

    Having exact same problem when trying to install the plugin on a Debian OS machine without git installed.

  5. Goffen commented on Dec 12, 2025

    @Goffen

    Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions