Flux: Flux helm operator doesn't work with non-master branches

Created on 1 Mar 2018  路  16Comments  路  Source: fluxcd/flux

The specific error we're seeing is:

ts=2018-02-28T22:45:24.276957262Z caller=main.go:225 component=helm-operator error="Failed to clone git repo [[email protected]:username/repo.git, charts, flux]: reference not found

Looks like it may be an error in the way we're calling the git library we're using, and it looks like master works.

bug helm onboardinactivation sizsmall

All 16 comments

I can confirm this. This is happening to me as well.

@rossedman if you can find a way to use a master branch, that'll work for the time being. I'll update this issue as I progress.

@sambooo yeah can do, tried to fork and change some code but wasn't sure how to test and deploy with it.

@sambooo You can do checkouts from branch with something like this:

    r, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
        URL:           repo,
        ReferenceName: plumbing.ReferenceName(fmt.Sprintf("refs/heads/%s", branch)),
        SingleBranch:  true,
        Depth:         1,
    })

Seems like the checkout is happening and then branch changing. This example uses in storage memory as well.

@rossedman I just extracted a minimal amount of code to reproduce the failure outside of the helm-operator itself. See: #977. Contributions welcome if you spot a fix before I do!

@sambooo Awesome. Thanks so much. When I run locally with kubeconfig I cannot connect to Tiller, how do you solve this problem when testing locally? Was going to try to debug as well.

@rossedman I didn't author this part of the code, so I'm not sure how that's done. @tamarakaufler might be able to answer your question.

@rossedman I've just built and pushed quay.io/samb/helm-operator:v1 from the changes in #977. Would you mind putting that in your yaml and letting me know if it fixes the problem?

@sambooo This appeared to work for me. Fresh cluster in Docker Edge and reapplied everything. Received successful clones.

Awesome! I'll rework that PR and get it merged into master at some point. You should be fine to use that image for the time being.

Cheers for the input 馃憤

@sambooo Thanks so much!

Hello @rossedman :wave:

When I run locally with kubeconfig I cannot connect to Tiller
Can you provide the arguments you give to the helm-operator, please? That will help me understand your case.

My working scenario: I am running minikube, so I dont provide any kubeconfig or master flag (minikube was installed with default setup). Tiller is installed at its default place within my local cluster (through helm init), so I dont provide tiller-ip, tiller-port or tiller-namespace either. When tiller flags are not provided, helm-operator discovers tiller IP and port within the cluster and tiller default namespace is kube-system.

@rossedman
One more comment. The image which you used to verify the fix provided here was built from code still containing a chart sync bug ((when there is change only under the charts path but no changes related to Custom Resources), as the feature branch has not been merged yet. The original image quay.io/weaveworks/helm-operator:alpha works fine in that respect, but, of course, contains the bug you reported. Wanted to mention this in case you make a Chart change only and cannot see the expected release upgrade. Both fixes will be merged soon and a new helm-operator image pushed.

@tamarakaufler Okay this makes sense. I need to build image and deploy versus run locally. If trying to run locally though, even when you provide kubeconfig, the operator fails because it can't reach Tiller.

Yeah we noticed the chart sync error and saw some open issues on that. So that change must've been merged in the last day or two? Also seeing lots of issues around variables. I opened an issue for this recently.

A new image containing fix both for the chart sync issue mentioned above and the non-master branch bug pushed as
quay.io/repository/weaveworks/helm-operator:alpha (#988)

Implementation (https://github.com/weaveworks/flux/pull/988) merged into master.

Was this page helpful?
0 / 5 - 0 ratings