Files
66e9107688 Fix(cli): guard vela top against nil rest.Config panic (#7279)
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>
2026-08-12 11:25:16 +01:00
..
2023-05-15 16:07:51 +08:00
2023-05-15 16:07:51 +08:00
2024-07-27 17:44:20 +08:00
2024-07-27 17:44:20 +08:00