Switch view to deleted resource get "Component has no name"
Describe the bug
Let's say I have a custom resource named configs, if I deleted the CRDs and all dashboards CR, and then switch view to configs again, k9s may exit and show "Component has no name error". However this bahaviour is not consistent, as k9s may not exit and just show an error message resource not found in the view.
To Reproduce Steps to reproduce the behavior:
- Create a CRD and CR
- Delete CRD and all CR by Helm
- Switch view to the CR
- K9s exits and show "Component has no name" error
Expected behavior I think it can go to a default view instead of exit. For example, namespace view
Screenshots If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- OS: macOS
- K9s: 0.25.18
- kind: 0.14.0
Additional context Add any other context about the problem here.
I also encountered this issue (unsure if it was related to CRDs being deleted or if I just typo'd some garbage resource type). k9s would immediately quit on open with
Boom!! Component has no name.
To workaround, I just ran k9s -c pods and then was able to open k9s normally.