Latest version of Helm step is broken

I upgraded the step but I’m now getting the following warnings and error:

Running plugin deploy
Pulling image codefresh/cfstep-helm:3.4.1
Pulled layer '5a3ea8efae5d'
Pulled layer '41b0e6f42508'
Pulled layer 'ad3665eebd71'
Pulled layer '13ac0a3b2fa6'
Pulled layer '9c2441d78766'
Pulled layer '1e1f4a5d0d17'
Pulled layer '6a2cb5a06f83'
Pulled layer '128a29a5f29f'
Pulled layer 'b469b6437b61'
Digest: sha256:9e48a641ffd51740c300eba08b387ce97ead5af825318a800f7e6b28437bac57
Status: Downloaded newer image for codefresh/cfstep-helm:3.4.1

Running the following script:
----------------------------
#!/bin/bash -e
export HELM_REPO_ACCESS_TOKEN=$CF_API_KEY
export HELM_REPO_AUTH_HEADER=Authorization
kubectl config use-context "<REDACTED>"
helm version --short -c
helm repo add cf-stable https://kubernetes-charts.storage.googleapis.com/
helm upgrade main vault --install --reset-values --repo https://helm.releases.hashicorp.com/ --values cloud-gateway/charts/defaults/vault.yml --set <REDACTED> ----------------------------

failed to load plugins: two plugins claim the name "push" at "/root/.helm/helm/plugins/helm-push.git" and "/root/.helm/helm/plugins/https-github.com-chartmuseum-helm-push.git"
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config
Switched to context "gateway-test".
failed to load plugins: two plugins claim the name "push" at "/root/.helm/helm/plugins/helm-push.git" and "/root/.helm/helm/plugins/https-github.com-chartmuseum-helm-push.git"
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config
Reading environment variable exporting file contents.
Error: repo "https://kubernetes-charts.storage.googleapis.com/" is no longer available; try "https://charts.helm.sh/stable" instead
v3.4.1+gc4e7485
e[31m[SYSTEM] 
 e[31mMessagee[39m             e[31mFailed to run freestyle step: maine[39m                                                                 
 e[32mCaused bye[39m           Container for step title: main, step type: freestyle, operation: Freestyle step. Failed with exit  
                     code: 1                                                                                            
 e[32mDocumentation Linke[39m  https://codefresh.io/docs/docs/codefresh-yaml/steps/freestyle/                                     
 e[32mExit codee[39m           1                                                                                                  
 e[32mNamee[39m                NonZeroExitCodeError                                                                               e[0m
------
e[31m[SYSTEM] 
 e[31mMessagee[39m             e[31mstep: deploy failede[39m                                                                                
 e[32mCaused bye[39m           plugin failed                                                                                      
 e[32mDocumentation Linke[39m  https://codefresh.io/docs/docs/codefresh-yaml/steps                                                e[0m

Thanks for the report.

It seems that Helm made some changes in the last week

We will check and fix the step ASAP. Sorry for the inconvenience

No worries, and thank you!

Hello,

I am facing the same issue and although the first problem indeed comes from the repository url change, I could overcome it using the (undocumented ?) env variable SKIP_CF_STABLE_HELM_REPO=true. Note that when using push, the documented option skip_cf_stable_helm_repo does not work.

I did a small (probably unsufficient) PR about that : Update helm3 command builder to use new repository location instead o… by hartym · Pull Request #70 · codefresh-contrib/cfstep-helm · GitHub

There is a second problem that I encounter and the original poster have too, when using the push command. The problem exists with 3.4.1, but not with 3.3.1, and is referenced on chartmuseum repository issues : Helm push fails with error message when installed in Helm newer then 3.3.1 · Issue #84 · chartmuseum/helm-push · GitHub

Cheers.

Hello @rdorgueil

We have merged your Pull request (many thanks for this!) and also fixed the helm image for 3.4.1

Can you please check again and verify?

Hello,

Still seeing the same issue when using 3.4.1

#!/bin/bash -e                                                                                                                           
export HELM_REPO_ACCESS_TOKEN=$CF_API_KEY                                                                                                
export HELM_REPO_AUTH_HEADER=Authorization                                                                                               
helm version --short -c                                                                                                                  
helm repo add cf-helm-default cm://h.cfcr.io/.../default/                                                                          
helm repo add remote cm://h.cfcr.io/.../default/                                                                                   
helm dependency build config/charts/extranet || helm dependency update config/charts/extranet || echo "dependencies cannot be updated"   
PACKAGE="$(helm package config/charts/extranet --destination /tmp | cut -d " " -f 8)"                                                    
helm push $PACKAGE remote----------------------------                                                                                    
                                                                                                                                         
failed to load plugins: two plugins claim the name "push" at "/root/.helm/helm/plugins/helm-push.git" and "/root/.helm/helm/plugins/https
-github.com-chartmuseum-helm-push.git"                                                                                                   
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config           
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config           
failed to load plugins: two plugins claim the name "push" at "/root/.helm/helm/plugins/helm-push.git" and "/root/.helm/helm/plugins/https
-github.com-chartmuseum-helm-push.git"                                                                                                   
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config           
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /codefresh/volume/sensitive/.kube/config           
Reading environment variable exporting file contents.                                                                                    
Error: could not find protocol handler for: cm                                                                                           
v3.4.1+gc4e7485

Hello

Thanks for checking. It seems that for this we are waiting the chartmusem fix.
I will let you know once I have an update.

1 Like

I suspect it will be possible to uninstall the helm push plugin via the Helm Auth step. The question is why you included it in the first place?

Hello and welcome to the Codefresh community!

If you are asking why we included the push plugin, it is for workflows like this HELM Best practices · Codefresh | Docs. Or you mean something different?

I expect the push plugin to go away, as more and more container registries become OCI compliant. The current Helm version has an experimental option to push charts to container registries Helm | Registries. But until this becomes widespread, using the Helm push plugin is the easiest solution.

Thing is the chart museum plugin adds this push functionality. Why also install the other plugin?

@ja6a-regnosys , @rdorgueil , @relaygus we have pushed another version of the Helm step that should solve this.

Let me know if that works for you now.