mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 03:56:36 +00:00
K8SVersion, velaCorePodUsage, and velaCLusterGatewayPodUsage in references/cli/top/model/info.go called kubernetes.NewForConfig / metrics.NewForConfig without checking for a nil *rest.Config first. client-go panics with a nil-pointer dereference in that case instead of returning an error, so vela top crashes instead of showing Unknown/N/A for those fields. Confirmed via two independent call paths that both panicked before this fix: InfoBoard.Init (references/cli/top/component) and App.Init (references/cli/top/view). Added regression tests for all three functions with a nil config. Signed-off-by: sakirr05 <sakirahmed75531@gmail.com> Co-authored-by: sakirr05 <sakirahmed75531@gmail.com>