Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Helm operator: dependency failure #1852

Closed
derrickburns opened this issue Mar 21, 2019 · 14 comments
Closed

Helm operator: dependency failure #1852

derrickburns opened this issue Mar 21, 2019 · 14 comments
Labels

Comments

@derrickburns
Copy link
Contributor

It appears that the helm operator does not handle dependencies whose repo ends in a slash,such as when using a sub-repo in the google repo such as solo-public-repo.

Using an independent HelmRelease for the dependency works.

Using helm directly works.

Using weave helm operator with a dependency as described does not work.

@hiddeco
Copy link
Member

hiddeco commented Mar 21, 2019

This was reported in #1707, #1732, #1784 and #1833 and has been fixed with #1735.

The reason it is not working for you yet is that we haven't put out a release of the Helm operator since it was merged, this is however on our planning and now has an additional +1 priority wise.

@derrickburns
Copy link
Contributor Author

ETA?

@hiddeco
Copy link
Member

hiddeco commented Mar 21, 2019

My plan is to prep it tomorrow, release itself will probably after the weekend. To ease your pain (and to confirm the fix from #1735 also fixes this issue, as you also reported #1833), are you prepared to run a nightly build?

quay.io/weaveworks/helm-operator:master-48966b9d should be your friend.

@derrickburns
Copy link
Contributor Author

derrickburns commented Mar 21, 2019 via email

@derrickburns
Copy link
Contributor Author

default/flux-helm-operator-7c89545754-lfg9d[flux-helm-operator]: ts=2019-03-21T18:46:01.643119358Z caller=chartsync.go:250 component=chartsync error="Failure to do manual release sync: failed to get HelmRelease resources from the API server: the server could not find the requested resource (get helmreleases.flux.weave.works)"
default/flux-helm-operator-7c89545754-lfg9d[flux-helm-operator]: ts=2019-03-21T18:46:01.64315211Z caller=chartsync.go:252 component=chartsync info="End of releasesync"
default/flux-helm-operator-7c89545754-lfg9d[flux-helm-operator]: E0321 18:46:02.259362       5 reflector.go:205] github.com/weaveworks/flux/integrations/client/informers/externalversions/factory.go:114: Failed to list *v1beta1.HelmRelease: the server could not find the requested resource (get helmreleases.flux.weave.works)

@derrickburns
Copy link
Contributor Author

@hiddeco See above errors. Do I also need to update the flux operator at the same time?

@hiddeco
Copy link
Member

hiddeco commented Mar 21, 2019

Is the custom resource listed under kubectl get crd? This is an error you would normally get if this isn’t the case.

@derrickburns
Copy link
Contributor Author

I did a full reinstall and got this.

default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: ts=2019-03-21T19:00:30.909887153Z caller=chartsync.go:335 component=chartsync warning="Failed to update chart dependencies" namespace=qa1 name=tidepool error="could not update dependencies in /tmp/flux-working847067350/k8s/charts/tidepool: Error: no repository definition for https://storage.googleapis.com/solo-public-helm/. Please add the missing repos via 'helm repo add'\n"
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: ts=2019-03-21T19:00:30.98088856Z caller=release.go:147 component=release info="processing release  (as qa1-tidepool-mongo)" action=CREATE options="{DryRun:false ReuseName:false}" timeout=300s
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: E0321 19:00:37.468775      11 runtime.go:66] Observed a panic: "assignment to entry in nil map" (assignment to entry in nil map)
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:72
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /usr/local/go/src/runtime/asm_amd64.s:573
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /usr/local/go/src/runtime/panic.go:502
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /usr/local/go/src/runtime/hashmap_fast.go:696
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/integrations/helm/release/release.go:371
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/integrations/helm/release/release.go:360
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/integrations/helm/release/release.go:162
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/integrations/helm/chartsync/chartsync.go:353
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /go/src/github.com/weaveworks/flux/integrations/helm/chartsync/chartsync.go:242
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: /usr/local/go/src/runtime/asm_amd64.s:2361
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: panic: assignment to entry in nil map [recovered]
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: 	panic: assignment to entry in nil map
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]:
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: goroutine 29 [running]:
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: github.com/weaveworks/flux/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: 	/go/src/github.com/weaveworks/flux/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x107
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: panic(0x13fcb80, 0x1741560)
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: 	/usr/local/go/src/runtime/panic.go:502 +0x229
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: github.com/weaveworks/flux/integrations/helm/release.mergeValues(0x0, 0xc4200dcc60, 0x432cbb)
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: 	/go/src/github.com/weaveworks/flux/integrations/helm/release/release.go:371 +0x305
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: github.com/weaveworks/flux/integrations/helm/release.values(0x1779e60, 0xc420404590, 0xc42059aa19, 0x3, 0x0, 0x0, 0x0, 0xc4200dcc60, 0xc42070dbe0, 0xc4200bdf80, ...)
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: 	/go/src/github.com/weaveworks/flux/integrations/helm/release/release.go:360 +0xfc8
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: github.com/weaveworks/flux/integrations/helm/release.(*Release).Install(0xc420022320, 0xc4209cc840, 0x2b, 0xc420a158c0, 0x12, 0xc42059a960, 0xb, 0xc4217e70c0, 0x18, 0xc42059a9c0, ...)
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: 	/go/src/github.com/weaveworks/flux/integrations/helm/release/release.go:162 +0x8d7
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: github.com/weaveworks/flux/integrations/helm/chartsync.(*ChartChangeSync).reconcileReleaseDef(0xc420380f00, 0xc42059a960, 0xb, 0xc4217e70c0, 0x18, 0xc42059a9c0, 0xe, 0x0, 0x0, 0xc42059aa19, ...)
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: 	/go/src/github.com/weaveworks/flux/integrations/helm/chartsync/chartsync.go:353 +0xbde
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: github.com/weaveworks/flux/integrations/helm/chartsync.(*ChartChangeSync).Run.func1(0xc420380f00, 0xc420044db0, 0xcdefault/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: W0321 19:00:51.537293      11 client_config.go:552] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
default/flux-helm-operator-7c89545754-z795p[flux-helm-operator]: ts=2019-03-21T19:00:51.55500895Z caller=helm.go:88 component=helm info="connected to Tiller" version="sem_ver:\"v2.12.3\" git_commit:\"eecf22f77df5f65c823aacd2dbd30ae6c65f186e\" git_tree_state:\"clean\" " host=tiller-deploy.kube-system:44134 options="{Host: Port: Namespace:kube-system TLSVerify:false TLSEnable:false TLSKey:/etc/fluxd/helm/tls.key TLSCert:/etc/fluxd/helm/tls.crt TLSCACert: TLSHostname:}"

@derrickburns
Copy link
Contributor Author

@hiddeco Note that the first line is the original error that I reported.

@derrickburns
Copy link
Contributor Author

Here is my requirements.yaml file.

dependencies:
  - name: gloo
    repository: https://storage.googleapis.com/solo-public-helm/
    version: 0.10.5
    condition: gloo.enabled
    tags:
      - front-end
  - name: ambassador
    repository: https://kubernetes-charts.storage.googleapis.com/
    version: 1.1.5
    condition: ambassador.enabled
    tags:
      - front-end

@hiddeco
Copy link
Member

hiddeco commented Mar 21, 2019 via email

@derrickburns
Copy link
Contributor Author

derrickburns commented Mar 21, 2019 via email

@hiddeco
Copy link
Member

hiddeco commented Mar 22, 2019

It appears that the helm operator does not handle dependencies whose repo ends in a slash, such as when using a sub-repo in the google repo such as solo-public-repo.

This ends up not being the problem, you should add the repositories from your requirements.yaml files to the repositories.yaml known to Helm, as we only ship the stable repository with the Helm operator.

Details about how and where to mount a custom repositories.yaml can be found here: https://github.com/weaveworks/flux/blob/897ca7380e2e145ca59f5b83f0e60351699de803/site/helm-integration.md#authentication-for-helm-repos

@2opremio 2opremio added the helm label Mar 22, 2019
@hiddeco
Copy link
Member

hiddeco commented Mar 26, 2019

Closing this as it has been superseded by #1862.

@hiddeco hiddeco closed this as completed Mar 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants