keel icon indicating copy to clipboard operation
keel copied to clipboard

slack approvals don't come in helm3

Open botzill opened this issue 5 years ago • 24 comments

I installed the latest version 0.17.0-rc1 and also switched to helm3 but seems that I don't get any slack notification when I submit new change via native webhook. Was there any changes on this parts?

botzill avatar Aug 02 '20 11:08 botzill

OK, I will look into:

HelmDriver:       os.Getenv("HELM_DRIVER"),
        KubeContext:      os.Getenv("HELM_KUBECONTEXT"),
        KubeToken:        os.Getenv("HELM_KUBETOKEN"),

maybe we need to set them as well.

Would be great to have some info in docs about how to setup helm3

botzill avatar Aug 02 '20 11:08 botzill

might be something else, for me with helm3 I didn't have to set any other variables :|

rusenask avatar Aug 02 '20 12:08 rusenask

I use custom helm driver to save data into postgress, do we need to setup that env HELM_DRIVER_SQL_CONNECTION_STRING

?

botzill avatar Aug 02 '20 13:08 botzill

@rusenask what helm driver you are using for helm3 that works for you?

botzill avatar Aug 03 '20 10:08 botzill

I don't think I have set anything specific so I guess the default one? maybe @nnt1054 can answer this?

rusenask avatar Aug 03 '20 11:08 rusenask

Hey! Sorry for the lack of documentation, this wasn't a feature I've personally tested yet. I'm having a look rn, the Helm3 provider uses this function from the Helm v3 Go pkg: https://github.com/helm/helm/blob/0ad800ef43d3b826f31a5ad8dfbb4fe05d143688/pkg/action/action.go#L359

It looks like you need to set both HELM_DRIVER to "sql" and HELM_DRIVER_SQL_CONNECTION_STRING just in your environment. Lmk if that helps or what kind of results you're getting.

nnt1054 avatar Aug 03 '20 13:08 nnt1054

OK, I think we need to modify keel helm chart to accept custom env.

botzill avatar Aug 04 '20 17:08 botzill

@rusenask if you can take a look and merge the chart so that I can easily test that.

Thx.

botzill avatar Aug 04 '20 18:08 botzill

Hm, according to docs:

$HELM_DRIVER | set the backend storage driver. Values are: configmap, secret, memory, postgres

I do set it to postgres or sql and I get the error:

panic: Unknown driver in HELM_DRIVER: postgres

goroutine 71 [running]:
helm.sh/helm/v3/pkg/action.(*Configuration).Init(0xc000015900, 0x25ba680, 0xc000022dc0, 0x0, 0x0, 0xc00005602c, 0x8, 0x2214e38, 0xc000026068, 0x32)
	/go/pkg/mod/helm.sh/helm/[email protected]/pkg/action/action.go:248 +0x4eb
github.com/keel-hq/keel/provider/helm3.(*Helm3Implementer).generateConfig(0xc000015580, 0x0, 0x0, 0x1dadf20)
	/go/src/github.com/keel-hq/keel/provider/helm3/implementer.go:102 +0x132
github.com/keel-hq/keel/provider/helm3.(*Helm3Implementer).ListReleases(0xc000015580, 0x35eb240, 0xc00071b480, 0x1, 0x0, 0x4e4221)
	/go/src/github.com/keel-hq/keel/provider/helm3/implementer.go:52 +0x4b
github.com/keel-hq/keel/provider/helm3.(*Provider).TrackedImages(0xc0000155c0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/github.com/keel-hq/keel/provider/helm3/helm3.go:181 +0x4b
github.com/keel-hq/keel/provider.(*DefaultProviders).TrackedImages(0xc0005f7080, 0xc000a1c198, 0x203000, 0x0, 0x0, 0x203000)
	/go/src/github.com/keel-hq/keel/provider/provider.go:101 +0x105
github.com/keel-hq/keel/trigger/poll.(*DefaultManager).scan(0xc0000156c0, 0x25b9cc0, 0xc00074f840, 0x1, 0x1)
	/go/src/github.com/keel-hq/keel/trigger/poll/manager.go:74 +0x4b
github.com/keel-hq/keel/trigger/poll.(*DefaultManager).Start(0xc0000156c0, 0x25b9cc0, 0xc00074f840, 0x0, 0x0)
	/go/src/github.com/keel-hq/keel/trigger/poll/manager.go:48 +0x102
created by main.setupTriggers
	/go/src/github.com/keel-hq/keel/cmd/keel/main.go:458 +0x759

same for sql

panic: Unknown driver in HELM_DRIVER: sql

goroutine 33 [running]:
helm.sh/helm/v3/pkg/action.(*Configuration).Init(0xc0005963c0, 0x25ba680, 0xc000b70000, 0x0, 0x0, 0xc00005801c, 0x3, 0x2214e38, 0x400, 0x400)
	/go/pkg/mod/helm.sh/helm/[email protected]/pkg/action/action.go:248 +0x4eb
github.com/keel-hq/keel/provider/helm3.(*Helm3Implementer).generateConfig(0xc0001639c0, 0x0, 0x0, 0x0)
	/go/src/github.com/keel-hq/keel/provider/helm3/implementer.go:102 +0x132
github.com/keel-hq/keel/provider/helm3.(*Helm3Implementer).ListReleases(0xc0001639c0, 0xc000b6e000, 0xc00015a500, 0x2212220, 0x0, 0x520fdc)
	/go/src/github.com/keel-hq/keel/provider/helm3/implementer.go:52 +0x4b
github.com/keel-hq/keel/provider/helm3.(*Provider).TrackedImages(0xc000163a00, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/github.com/keel-hq/keel/provider/helm3/helm3.go:181 +0x4b
github.com/keel-hq/keel/provider.(*DefaultProviders).TrackedImages(0xc00027e9a0, 0xc0008b40b8, 0x203000, 0x0, 0x0, 0x203000)
	/go/src/github.com/keel-hq/keel/provider/provider.go:101 +0x105
github.com/keel-hq/keel/trigger/poll.(*DefaultManager).scan(0xc000163b00, 0x25b9cc0, 0xc000162100, 0x1, 0x1)
	/go/src/github.com/keel-hq/keel/trigger/poll/manager.go:74 +0x4b
github.com/keel-hq/keel/trigger/poll.(*DefaultManager).Start(0xc000163b00, 0x25b9cc0, 0xc000162100, 0x0, 0x0)
	/go/src/github.com/keel-hq/keel/trigger/poll/manager.go:48 +0x102
created by main.setupTriggers
	/go/src/github.com/keel-hq/keel/cmd/keel/main.go:458 +0x759

@nnt1054 is that lib uptodate?

botzill avatar Aug 06 '20 06:08 botzill

OK, the version that is used does not have yet sql driver implemented, https://github.com/helm/helm/blob/v3.1.2/pkg/action/action.go.

Can we upgrade it?

botzill avatar Aug 06 '20 06:08 botzill

IIRC there were dependency issues with using the most recent Helm 3 Go pkg with (I think) the Helm 2 and k8s apis packages. If someone doesn't get to it first, I'll look into trying to upgrade it again when I get the chance. Moving forward we might want a new version of keel that supports Helm v3 only.

nnt1054 avatar Aug 06 '20 12:08 nnt1054

I think it's totally fine to deprecate helm v2 with tiller, there aren't really any benefits anymore for people to continue using helm v2

rusenask avatar Aug 06 '20 12:08 rusenask

I agree that sooner or later we need to migrate to helm3 and if dropping the support for v2 will make this transition faster.

botzill avatar Aug 10 '20 08:08 botzill

actually with go modules we can import any specific version without them clashing together. I am going on holiday in a few days so I will have a bit more spare time, I will try to debug this. If possible, we can keep v2 in, otherwise we will just have to support only v3.

rusenask avatar Aug 10 '20 15:08 rusenask

Great. @rusenask let us know if you have any updates on that.

botzill avatar Aug 17 '20 10:08 botzill

Hi.

Are there any updates on this?

botzill avatar Sep 14 '20 05:09 botzill

Hi @botzill, yeah, started working on this yesterday. As expected - a k8s dependency hell :)

rusenask avatar Sep 14 '20 09:09 rusenask

Hi @rusenask

Just wandering if you have any updates on the helm3 support?

botzill avatar Oct 08 '20 15:10 botzill

Hi @rusenask, wandering if managed to make some progress on this.

Thx.

botzill avatar Nov 04 '20 07:11 botzill

Hi.

Wondering if there is any update on helm 3 support for this issue?

botzill avatar Feb 08 '21 06:02 botzill

hi @rusenask, again me :). wondering if you made any progress on this issue :).

Thx1

botzill avatar Apr 14 '21 16:04 botzill

hey @botzill, I think at this point I have even more work than I had previously.. :D good news - one of the projects is using helm3 so I will need to get this working for myself. My time currently mostly goes to https://grid.ai and https://docs.synpse.net/ so not much is left for other things : |

rusenask avatar Apr 15 '21 10:04 rusenask

thx @rusenask for the update.

Interesting services you work on will definitely check them.

botzill avatar Apr 20 '21 15:04 botzill

hi @rusenask :)

How it's going?

Any change to look at this feature?

Thx

botzill avatar Jul 26 '21 18:07 botzill