vmware-archive / octant

Highly extensible platform for developers to better understand the complexity of Kubernetes clusters.
https://octant.dev
Apache License 2.0
6.28k stars 489 forks source link

Missing support for HPA `apiVersion: autoscaling/v2` #3274

Open sebader opened 2 years ago

sebader commented 2 years ago

What steps did you take and what happened: On k8s 1.23 I deployed an HPA (horizontal pod autoscaler) with the new api version

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler

Now when I want to look at the HPA in the Octant UI, nothing loads but I can observe the following error on the CLI

2022-05-18T11:37:06.254+0200    ERROR   api/content_manager.go:159      generate content        
{"client-id": "bf906f0f-d68d-11ec-b073-9cebe8b8cdef", 
"err": "generate content: scheme convert: no kind \"HorizontalPodAutoscaler\" is registered for version \"autoscaling/v2\" in scheme \"k8s.io/client-go/kubernetes/scheme/register.go:72\"", "content-path": "overview/namespace/workload/discovery-and-load-balancing/horizontal-pod-autoscalers"}
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).runUpdate.func1
        /__w/octant/octant/internal/api/content_manager.go:159
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run.func1
        /__w/octant/octant/internal/api/poller.go:86
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run
        /__w/octant/octant/internal/api/poller.go:95
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).Start

What did you expect to happen:

HPA with v2 should also be work in Octant

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment: