Helmfile: Helm3 migration

Created on 3 Dec 2019  Â·  8Comments  Â·  Source: roboll/helmfile

Hi
I manage 24 different apps in helmfile.yaml
Part of them stable releases , part of them custom charts.
helmfile version v0.90.8
helm version v2.16.1.

I would like to migrate to helm3.
We are running helm with local tiller so if i migrate to helm3 it will simplify things.

Is there any guide on how to migrate my setup to helm3?
Thanks

Most helpful comment

Finally ive managed to migrate.
Ive created repo with explanation and examples.

https://github.com/wix-playground/helm3diff

All 8 comments

does this project support helm3?

Please elaborate. Why project needs to support helm3.
I was expecting helm3 to put release secrets to proper namespaces and to work without tiller.
other than that it should deploy my templates to kube exactly as helm 2 did.
Am i missing something?

does this project support helm3?
Yes, you need enable to use helm3

https://github.com/roboll/helmfile/blob/07c42474cc3d338a75b46ee0883fb19fffd7d065/Dockerfile.helm3#L42

Ok ive did some experiments.
My test repo is https://github.com/wix-playground/helm3diff

helm version is version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

helm diff version is
diff 3.0.0-rc.7 Preview helm upgrade changes as a diff

helmfile version
helmfile version v0.94.1

Ive installed my charts using bash scrip ive created apply_helm3.sh test_cluster sync.
Charts are installed

but when i run helm3 diff i got error

helm3 diff upgrade simple-cm simple-cm
Error: context deadline exceeded
context deadline exceeded
Error: plugin "diff" exited with error

It looks like there's an open issue for that ^ https://github.com/databus23/helm-diff/issues/170

I've also failed to get this to work

>  helm version                                                                                                                                                                                            
version.BuildInfo{Version:"v3.0.1", GitCommit:"7c22ef9ce89e0ebeb7125ba2ebf7d421f3e82ffa", GitTreeState:"clean", GoVersion:"go1.13.4"}

>  helm plugin list                                                                                                                                                                                        
NAME        VERSION     DESCRIPTION                                                                  
2to3        0.1.3       migrate and cleanup Helm v2 configuration and releases in-place to Helm v3   
diff        3.0.0-rc.7  Preview helm upgrade changes as a diff                                       
helm-git    0.5.0       Get non-packaged Charts directly from Git.                                   
s3          0.8.0       Provides AWS S3 protocol support.                                            
                        https://github.com/hypnoglow/helm-s3                                         
secrets     2.0.2       This plugin provides secrets values encryption for Helm charts secure storing

then my run with debug. sorry I can't share the whole thing

>  HELMFILE_HELM3="1" helmfile diff                                                                                                                                                    
Adding repo stable https://kubernetes-charts.storage.googleapis.com
"stable" has been added to your repositories

Adding repo application-gateway-kubernetes https://appgwingress.blob.core.windows.net/ingress-azure-helm-package/
"application-gateway-kubernetes" has been added to your repositories

Updating repo
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "rhythmic" chart repository
...Successfully got an update from the "rhythmictech" chart repository
...Successfully got an update from the "application-gateway-kubernetes-ingress" chart repository
...Successfully got an update from the "application-gateway-kubernetes" chart repository
...Successfully got an update from the "EUS1OPSACR" chart repository
...Successfully got an update from the "aad-pod-identity" chart repository
...Successfully got an update from the "elastic" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈ 

Comparing release=ingress-azure, chart=application-gateway-kubernetes-ingress/ingress-azure
in ./helmfile.yaml: failed processing release ingress-azure: helm exited with status 1:
  Error: Failed to render chart: exit status 1: Error: template: ingress-azure/templates/deployment.yaml:28:38: executing "ingress-azure/templates/deployment.yaml" at <.Values.kubernetes.httpServicePort>: nil pointer evaluating interface {}.httpServicePort

  Error: plugin "diff" exited with error

let me know if I can be of help :)

Hey everyone!

ENV HELMFILE_HELM3="1"

The recent versions of Helmfile doesn't need this. It will automatically detect Helm 3 by running helm version -c and runs in the helm 3 mode accordingly.

helm3 diff upgrade simple-cm simple-cm
Error: context deadline exceeded
context deadline exceeded
Error: plugin "diff" exited with error

This means that even though helm plugi list shows it's 3.0.0-rc.7 is installed, what you actually have installed is the outdated binary of helm-diff.

Try

helm plugin install https://github.com/databus23/helm-diff --version v3.0.0-rc.7

If you don't want to recreate your cluster, try https://github.com/helm/helm-2to3. You'll need to firstly run helm-2to3 to convert v2 releases to v3 equivalents.

Finally ive managed to migrate.
Ive created repo with explanation and examples.

https://github.com/wix-playground/helm3diff

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pavdmyt picture pavdmyt  Â·  3Comments

GoldenMouse picture GoldenMouse  Â·  3Comments

maver1ck picture maver1ck  Â·  3Comments

daaain picture daaain  Â·  3Comments

sstarcher picture sstarcher  Â·  3Comments