cluster-api-visualizer
cluster-api-visualizer copied to clipboard
Contribution to enable v1beta2 cluster api support
trafficstars
Hello 👋 I'm just a random guy who are using your visualization tool for my work with CAPI. It seems to have problem when working with v1beta2 management cluster (deprecated for v1beta1):
│ I0928 09:38:24.784928 1 main.go:388] "GET call to url" url="/api/v1/version/" │
│ I0928 09:38:52.164069 1 main.go:388] "GET call to url" url="/api/v1/version/" │
│ I0928 09:38:52.264030 1 main.go:253] "GET call to url" url="/api/v1/management-cluster/" │
│ I0928 09:38:52.273451 1 warning_handler.go:65] "cluster.x-k8s.io/v1beta1 Cluster is deprecated; use cluster.x-k8s.io/v1beta2 Cluster" logger="KubeAPIWarningL │
│ ogger" │
│ I0928 09:38:54.390061 1 main.go:388] "GET call to url" url="/api/v1/version/" │
│ I0928 09:38:54.397746 1 main.go:286] "GET call to url" url="/api/v1/describe-cluster/" │
│ I0928 09:38:54.397782 1 main.go:287] "GET call params are" params={"name":["docker-cluster-one"],"namespace":["default"]} │
│ E0928 09:38:54.412144 1 main.go:306] "failed to construct resource tree for target cluster" err="this version of clusterctl could be used only with \"v1beta1 │
│ \" management clusters, \"v1beta2\" detected" clusterName="docker-cluster-one" │
│ I0928 09:38:54.421316 1 main.go:388] "GET call to url" url="/api/v1/version/" │
│ I0928 09:39:55.056364 1 main.go:286] "GET call to url" url="/api/v1/describe-cluster/" │
│ I0928 09:39:55.056403 1 main.go:287] "GET call params are" params={"name":["docker-cluster-one"],"namespace":["default"]} │
│ E0928 09:39:55.068001 1 main.go:306] "failed to construct resource tree for target cluster" err="this version of clusterctl could be used only with \"v1beta1 │
│ \" management clusters, \"v1beta2\" detected" clusterName="docker-cluster-one"
I've come up with some code updates to make this tool to be able to work with v1beta2 CAPI cluster. Hope it's useful for people who are planning to use this tool for newer apiVersion of CAPI cluster 🚀