skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Support helm 3

Open corneliusweig opened this issue 7 years ago • 37 comments

Expected behavior

Skaffold should work with helm 3. The pre-release for helm3 was published today (May 16).

As long as Skaffold does not support helm3, there should be an error message with a recommendation to downgrade.

Actual behavior

When trying the helm-deployment example, skaffold run failed with

(...)
Starting deploy...
Error: release: not found
Helm release skaffold-helm not installed. Installing...
Error: unknown flag: --name
WARN[0000] error retrieving helm deployment info: Error: release: not found 
Pruning images...
WARN[0000] builder cleanup: pruning images: Error response from daemon: conflict: unable to delete 890f17d42fc2 (cannot be forced) - image is being used by running container e0f8aa619e83 
Cleaning up...
Error: unknown flag: --purge
Cleanup complete in 48.575768ms
FATA[0000] exiting dev mode because first run failed: deploy failed: deploying skaffold-helm: exit status 1

So it seems that helm 3 does not support the --name flag anymore.

Information

  • Skaffold version: master
  • helm version: helm3 (https://github.com/helm/helm/releases)
  • Operating system: linux

corneliusweig avatar May 16 '19 21:05 corneliusweig

thanks @corneliusweig, yeah I'll try playing around with this more next week and see what needs to be done. I'm all for trying to support it, just need to see what kind of changes we need to make.

nkubala avatar May 17 '19 19:05 nkubala

Hey, is Helm 3 support in the road map?

bjoberg avatar Jun 27 '19 16:06 bjoberg

We've done some testing with skaffold and helm 3, the most important changes in terms of standard run / delete workflow are removing the --name flag from the install and --purge flag from delete. In a private fork we've added a flag to switch between helm 3 and helm 2 mode but not sure the right way to implement this upstream.

We also made it configurable to switch helm binary names since, for testing we map helm => helm v2.14.3 and helm3 => v3.0.0-beta.3.

If anyone has pointers on whether a flag to switch between helm 2 and helm 3 modes is amenable in the short term, that'd be great.

mikesplain avatar Sep 11 '19 14:09 mikesplain

Maybe change the manifest? Deprecate the key helm: and instead use helm2:/helm3:.

Or make a field helm:version mandatory after warning about the change for a few releases.

AndiDog avatar Sep 11 '19 19:09 AndiDog

@mikesplain Can the private repository be shared? We're very much interested in testing helm3 with skaffold. Currently we're manually running some scripts prior to running skaffold locally, since we're already on helm3 for local development.

Multiply avatar Sep 17 '19 09:09 Multiply

@mikesplain Do you have a fork of skaffold with your changes to support helm v3? I have one I will release shortly unless you can make yours public. I don't want to muddy the waters with multiple approaches.

Seems to me that modifying the skaffold.yaml file in anyway to support helm v3 is the wrong approach. One team might develop/use the same project with helm v2 and another with helm v3. No need to change the skaffold.yaml file. Skaffold can simply detect helm v3 with helm version --short and then skaffold can do the right thing. I am doing this in my fork.

ktarplee avatar Sep 17 '19 17:09 ktarplee

with helm 3 official release, you can get skaffold run to work by adding

    flags:
      upgrade:
        - "--install"

But this is only a temporary fix until skaffold fully supports helm 3.

What is still not working at the moment is to delete a release as the syntax changed.

igoooor avatar Nov 14 '19 10:11 igoooor

Is there a wip effort (or even a branch?) to fix this on the googly side that we can't see? If not, I might be up to take a pass at this.

snickell avatar Nov 14 '19 16:11 snickell

The notable differences with helm v3 that I have noticed and fixed in my skaffold fork are:

  1. "helm install" syntax changed
  2. "helm get" syntax changed. This is used in skaffold to check if the release already exists (for install vs upgrade)
  3. "helm delete" does not have --purge

My fork went the path of making the helm deployer work for both helm v3 and helm v2. It looks like the maintainers would rather have a new/separate deployer for helm v3.

ktarplee avatar Nov 15 '19 09:11 ktarplee

Is there any work going on for getting this implemented?

bjornmagnusson avatar Nov 28 '19 16:11 bjornmagnusson

The notable differences with helm v3 that I have noticed and fixed in my skaffold fork are:

  1. "helm install" syntax changed
  2. "helm get" syntax changed. This is used in skaffold to check if the release already exists (for install vs upgrade)
  3. "helm delete" does not have --purge

My fork went the path of making the helm deployer work for both helm v3 and helm v2. It looks like the maintainers would rather have a new/separate deployer for helm v3.

This fork was working for the most part unless one was using helm with a namespace, then it would fail. I have never looked at a single line of go before but I am a good coder so I adjusted some things and it is working correctly for me now. If anyone experience with go would like to give it a go do it up. I am attaching the helm.go file if anyone is interested. helm.go.zip BTW I built it from source for osx and have only used it with Skaffold dev command so far so I could have missed some things

code-is-art avatar Nov 30 '19 03:11 code-is-art

I updated my fork to incorporate @cloudtagger changes to support namespaces properly.

ktarplee avatar Dec 04 '19 17:12 ktarplee

any news when skaffold will be officially supporting helm 3 ?

Romeh avatar Dec 23 '19 15:12 Romeh

Is there a way to use skaffold 1.1 with helm 3 at this point in time?

hipstern avatar Jan 03 '20 00:01 hipstern

@igoooor's fix above will make Skaffold work with Helm 3 for installing, but it won't delete the release at the end and you'll have to do it manually (with helm uninstall).

TBBle avatar Jan 03 '20 04:01 TBBle

Is there a way to use skaffold 1.1 with helm 3 at this point in time?

I updated my skaffold fork to v1.1.0. The only change is support ffor helm 3 (see earlier in this ticket).

ktarplee avatar Jan 03 '20 16:01 ktarplee

This should resolve #3476 since Helm3 finally has this fix https://github.com/helm/helm/issues/2060#issuecomment-461877394

kvokka avatar Jan 06 '20 22:01 kvokka

Is there a way to use skaffold 1.1 with helm 3 at this point in time?

I updated my skaffold fork to v1.1.0. The only change is support ffor helm 3 (see earlier in this ticket).

I am using it @ktarplee and works like a charm! Thanks :)

eulersson avatar Jan 06 '20 22:01 eulersson

@nkubala is it possible to ship @ktarplee fix? Helm 3 was released a few months ago, and this will allow to remove add the ability to support actual version.

This is a blocker, and it feels like not for me only.

Thank you

kvokka avatar Jan 06 '20 22:01 kvokka

@ktarplee or anyone else. How do you compile the skaffold repo? the binary built in @ktarplee skaffold fork does not work on a mac and it doesnt seem as staightforward to do a simple go build on that repo

Thanks

ekhaydarov avatar Jan 23 '20 11:01 ekhaydarov