-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Flux chokes on empty Custom Metrics GroupVersion #1951
Comments
Thanks for the detailed report and sorry for the inconvenience. I think that the underlying issue is that the GroupVersion Was
Pushing to git (release) and syncing (which is what fails) are separate operations. What was the exact message?
I agree:
|
I stand corrected. After some extra information from @stefansedich (he was kind enough to reproduce the problem on
I think the problem is that the Kubernetes Go client doesn't like empty GroupVersions. I don't know if that's ilegal but I will check. @stefansedich was using Datadog. @dvelitchkov was that the case with you too? |
Related: argoproj/argo-cd#524 |
I will work on a patch to tolerate groups with no API resources. Note, however, that the kubernetes client assumes the invariant of no group being empty. So, either the metric is breaking the invariant or the client is being too strict. |
@2opremio - sorry, not sure what you mean by "was that the case with you too"? Now that I know what to look at more closely, I did update a very old version of https://github.com/DirectXMan12/k8s-prometheus-adapter that we were running. So, currently: kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1
{"kind":"APIResourceList","apiVersion":"v1","groupVersion":"custom.metrics.k8s.io/v1beta1","resources":[]} So I'm getting an empty array in the response, which perhaps is a problem in my cluster, perhaps not, but it seems like this is what the k8s client is choking on here, right? |
I sorted this out. As soon as I fixed that, flux started working! So really not a bug in Flux per se, just misconfiguration -> empty array -> k8s api reports error -> flux can't sync. Thank you guys for the quick response and for leading me down the right path. |
Yes, that's were the problem was. I am working on a fix to tolerate empty VersionGroups, although technically is a misconfiguration as you stated. |
I meant whether you were using DataDog as well. |
Running into a strange problem.
I have a release that is managed by Flux+Helm. So far so good. Recently pushed an updated docker image and now Flux can't deploy it.
What's really concerning is, Flux pushes a commit to the Gitops repo saying the new release was rolled out, even though the operation clearly fails.
Running
fluxctl sync
:Some of the errors I see are
collating resources in cluster for sync: not found
andcouldn't get resource list for custom.metrics.k8s.io/v1beta1: <nil>
. Not super helpful.Log:
The image I want rolled is staging-v1.3.1-3, the currently running one is staging-v1.3.1-2.
The upgrade from v1.3.1-1 to v1.3.1-2 went off without a hitch, which was with an older releae of Flux.
I am now running the fresh-est release of Flux:
docker.io/weaveworks/flux:1.12.0
anddocker.io/weaveworks/helm-operator:0.8.0
Any ideas?
The text was updated successfully, but these errors were encountered: