helmsman icon indicating copy to clipboard operation
helmsman copied to clipboard

helm-diff plugin not installed correctly in docker container

Open LiamAttClarke opened this issue 3 years ago • 8 comments

I'm trying to create a Github Action that runs the following command:

helmsman --apply --subst-env-values --debug --verbose -f ./example.yaml

The command fails when trying to validate installed plugins with the following error:

helm diff plugin is not installed/configured correctly. Aborting!

helmsman version: v3.4.4 Docker release tag: latest (https://www.github.com/Praqma/helmsman/tree/8df609b873ca7be25c3bb781c14ee614c76477ca)

LiamAttClarke avatar Sep 25 '20 22:09 LiamAttClarke

I managed to get around this issue by manually installing the plugin for now.

LiamAttClarke avatar Sep 25 '20 22:09 LiamAttClarke

@LiamAttClarke I think helm diff is a required dependency for helmsman diff. If it's not installed in your github actions, it simply won't work. It's not bundled with helmsman.

nvanheuverzwijn avatar Sep 30 '20 17:09 nvanheuverzwijn

I'm using the official docker image which should have helm-diff preinstalled.

See: https://github.com/Praqma/helmsman/blob/8df609b873ca7be25c3bb781c14ee614c76477ca/Dockerfile#L27

Github Action Job:

jobs:
  deploy:
    runs-on: ubuntu-latest
    container: praqma/helmsman
    steps:
   # https://github.com/Praqma/helmsman/issues/518
    - name: Force install helm-diff
      run: helm plugin install https://github.com/databus23/helm-diff
    - name: Checkout
      uses: actions/checkout@v2
    - name: Deploy
      run: helmsman --no-banner --debug --verbose --subst-env-values --apply --kubeconfig .kube/config -f ./deployment/staging/desired-state.yaml

LiamAttClarke avatar Sep 30 '20 17:09 LiamAttClarke

bash-5.0# helm plugin list
NAME   	VERSION	DESCRIPTION                                                                                
diff   	3.1.1  	Preview helm upgrade changes as a diff                                                     
gcs    	0.3.5  	Manage repositories on Google Cloud Storage                                                
s3     	0.9.2  	The plugin allows to use s3 protocol to upload, fetch charts and to work with repositori...
secrets	2.0.2  	This plugin provides secrets values encryption for Helm charts secure storing

The image would not work for a very long time now if the helm diff is not in there. Please give us the output of helm plugin list run on your container of a helmsman before you manually install the plugin.

mkubaczyk avatar Oct 02 '20 09:10 mkubaczyk

@LiamAttClarke You could also add the sha hash of the docker you are running just to make sure you aren't running your own version or an old image.

nvanheuverzwijn avatar Oct 02 '20 12:10 nvanheuverzwijn

@nvanheuverzwijn

Digest: sha256:c65eb96641f5d888ab9ecc323f68fe90c7ec45f2e6719429cc607f14407643f2
2020-10-13 18:51:13 INFO: Validating that [ diff ] is installed
2020-10-13 18:51:13 DEBUG: helm plugin list
2020-10-13 18:51:13 CRITICAL: helm diff plugin is not installed/configured correctly. Aborting!

LiamAttClarke avatar Oct 13 '20 19:10 LiamAttClarke

@LiamAttClarke - Did you ever get any resolution on this. I was running into the same issue and determined that it was due to changing the $HOME directory which resulted in the plugins not be available where they were installed initially in the container.

veleek avatar May 04 '21 23:05 veleek

Hit the same issue and solved it by providing the HELM_PLUGINS env variable:

jobs:
  plan:
    runs-on: ubuntu-latest
    container: praqma/helmsman:v3.11.0-helm-v3.9.0
    env:
      HELM_PLUGINS: '/root/.local/share/helm/plugins'

prizov avatar Jun 09 '22 20:06 prizov

This issue has been marked stale due to an inactivity.

github-actions[bot] avatar Aug 19 '22 05:08 github-actions[bot]