coreos / tectonic-installer

Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Apache License 2.0
601 stars 266 forks source link

Unable to retrieve autoscalers in web front end #861

Closed rhenretta closed 7 years ago

rhenretta commented 7 years ago

Is this a BUG REPORT or FEATURE REQUEST?

Bug report

Versions

What happened?

I created an autoscaler for a deployment in kubectl. When I go to view the autoscalers, it hangs, and the console has the following output:

loaded namespaces
build.85f4d64….min.js:53 loaded horizontalpodautoscalers---{"ns":"golive"}
build.85f4d64….min.js:4 Uncaught (in promise) TypeError: Cannot read property 'replaceChild' of null
    at Function.i [as replaceChildWithTree] (build.85f4d64….min.js:4)
    at Object.dangerouslyReplaceNodeWithMarkup [as replaceNodeWithMarkup] (build.85f4d64….min.js:5)
    at f._replaceNodeWithMarkup (build.85f4d64….min.js:6)
    at f._updateRenderedComponent (build.85f4d64….min.js:6)
    at f._performComponentUpdate (build.85f4d64….min.js:6)
    at f.updateComponent (build.85f4d64….min.js:5)
    at f.receiveComponent (build.85f4d64….min.js:5)
    at Object.receiveComponent (build.85f4d64….min.js:7)
    at Object.updateChildren (build.85f4d64….min.js:5)
    at d._reconcilerUpdateChildren (build.85f4d64….min.js:7)
    at d._updateChildren (build.85f4d64….min.js:7)

I can see the deplpoyments with kubectl:

$ kubectl get hpa --namespace golive
NAME                                                         REFERENCE                                                               TARGETS           MINPODS   MAXPODS   REPLICAS   AGE
golive-deploy-staging-b9960216-ee86-4541-b3dd-34caa681a4b4   Deployment/golive-deploy-staging-b9960216-ee86-4541-b3dd-34caa681a4b4   <unknown> / 50%   2         10        2          14m
rhenretta commented 7 years ago

I thought it might be related to the Targets being unknown. Fixed it, but still see the same behavior

robszumski commented 7 years ago

The overall situation for HPAs is that they are still alpha, and we added UI support for them a little too early. Still working out a plan, but we might end up removing it from the UI until they reach beta.

bobhenkel commented 7 years ago

My understanding is that custom metrics are still in alpha, not all of HPA. Lots of K8s apis are in that kind of state I'm guessing. I don't think adding a view only list of which HPA are created in the web console is too soon, it's like doing a kubectl get hpa which works just fine, but isn't as pretty or convenient as the Tectonic Console. Just my 2cents.

The Horizontal Pod Autoscaler is an API resource in the Kubernetes autoscaling API group. The current stable version, which only includes support for CPU autoscaling, can be found in the autoscaling/v1 API version. The alpha version, which includes support for scaling on memory and custom metrics, can be found in autoscaling/v2alpha1. The new fields introduced in autoscaling/v2alpha1 are preserved as annotations when working with autoscaling/v1.

    "/apis/autoscaling",
    "/apis/autoscaling/v1",
    "/apis/autoscaling/v2alpha1",

https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

sym3tri commented 7 years ago

This has since been removed from the Console because it was an alpha feature that introduced breaking API changes. We may add it back at some point in the future once the upstream Kubernetes API stabilizes.