Jx: Boot fails with Helm 3

Created on 14 Nov 2019  路  18Comments  路  Source: jenkins-x/jx

Summary

When using Helm 3, the jx boot command fails. It should be specified as a requirement that only Helm 3 is supported and the error message should be clearer, at least until jx is adapted to use it.

Steps to reproduce the behavior

Install Helm 3

jx boot

The output:

...
error: initializing helm with config: {jx true false true false  }: failed to run 'helm init --client-only' command in directory '', output: 'Error: unknown flag: --client-only'

Expected behavior

jx boot works

Actual behavior

jx boot fails

Jx version

The output of jx version is:

NAME               VERSION
jx                 2.0.979
Kubernetes cluster v1.13.11-gke.14
kubectl            v1.16.2
git                2.20.1 (Apple Git-117)
Operating System   Mac OS X 10.14.6 build 18G1012

Jenkins type

  • [X] Serverless Jenkins X Pipelines (Tekton + Prow)
  • [ ] Classic Jenkins

Kubernetes cluster

Any

Operating system / Environment

MacOS

areboot arehelm kinenhancement prioritimportant-soon

Most helpful comment

Would be great to have Helm3 support sooner rather than later. It seems like it would solve some big problems with Helm2 due to tiller and JX's home grown tillerless option, which has problems with custom CRDs and deploying to multiple namespaces.

All 18 comments

I will second that

Running into the same thing. Any temporary workarounds for this other than downgrading?

@daniyalj brew install helm@2
With the:
echo 'export PATH="/usr/local/opt/helm@2/bin:$PATH"' >> ~/.zshrc

The issues with a helm version 3.0.0 that I saw:

  • Using the JX_HELM3 doesn't work. Even if I create a symbolic link from helm to helm3.
  • The init command does not exist with helm version 3.0.0
  • The template command does not have --name parameter, because it was changed to mandatory field
  • The upgrade command has a problem with existing resources. It complains about existing resource conflict: kind: XXX, namespace: XXX, name: XXX

If jx need to support version 2 and 3 of the helm, there could be an option to create 2 versions of helm_cli.go. Maybe extending Environment with helmVersion could help with defining the helm version or users could leverage helmMajorVersion in jx-requirement.yaml to adjust jx behavior. I think the best option could be to stick to the templating of charts.

Running into the same thing. Any temporary workarounds for this other than downgrading?

me too.

This is going to be investigated. We're not ready to support Helm 3 so better handling is needed. Described here - https://github.com/jenkins-x/jx/issues/6181

Would be great to have Helm3 support sooner rather than later. It seems like it would solve some big problems with Helm2 due to tiller and JX's home grown tillerless option, which has problems with custom CRDs and deploying to multiple namespaces.

Hi @polothy, Agreed.

More than 2 months from issue opening and all docs still show helm 3 support despite known issue and jx install and jx boot failing to work with helm 3. How about rip it from the docs as being supported and remove the --helm3 option until it is fully supported.

https://jenkins-x.io/docs/reference/components/helm3/

Hi @jp-gorman, indeed , you're correct! The expectation that JX would have Helm 3 support at the time of GA is completely incorrect due to the amount of effort required. I'll update that statement. In the meantime, if you can attend the Jenkins X Community Office Hours on Thursday Jan 23rd, @rawlingsj will be discussing Helm3 a bit - https://jenkins-x.io/community/

I can work on this, if it is ok, helm3 support would be nice

@jstrachan ^^^

Hi @ankitm123, please review the aforementioned proposal document. I believe this is WIP right now and your feedback in comments could prove useful. There may be tasks where your development contributions could become quite valuable.

@ankitm123 @deanesmith although I found the proposal really great, I think that for now we should just be able to skip the helm init when using helm 3. This clearly a blocking issue for a lot of folks.

These are the workarounds:

  • first disable verify helm since it run helm init that doesn't exist on helm3 (add - --disable-verify-helm=true in step verify preinstall in jenkins-x.yml
  • manually add default chartmuseum repo using :
helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
  • configure jx to use helm3: export JX_HELM3=true
  • disable velero since not available yet for baremetal (kubernetes) by deleting velero stepS in jenkins-x.yml
  • I also had to remove everything already installed in my cluster from jenkins-x (ingress, certificates issuers, external-dns...), hope this helps someone

Edit: on install failure, you might find yourself with an incomplete helm install with no clean way to uninstall jenkins-x and no way to reinstall due to resource already exists. The following does the trick:

 helm template jenkins-x cert-manager --namespace jx | kubectl delete -f -

or cd into the tmp folder generated by jenkins and use the same logique to clear other charts

AFAIK You can work off this PR: https://github.com/jenkins-x/jx/pull/6664. Build it locally, and use the resulting binary, if you want to use helm3.

here's the way you can use helm 3 with boot:
https://jenkins-x.io/docs/labs/boot/

Was this page helpful?
0 / 5 - 0 ratings