Skip to content

Show some output or message when no resources are found #3267

@ubaid-sh

Description

@ubaid-sh




Is your feature request related to a problem? Please describe.
k9s takes sometime to load/list the resources (for example pods) present in some namespace. While the time it loads those resources, k9s simply shows the number of resources (let's say pods) as 0. This number of resources, if any resources are found, suddenly changes to the actual number or resources that are present. The issue here is that the user is kept waiting and wondering if there are any resources present in the namespace (or in the context or anywhere where resources can be present). Since k9s shows 0 for both no resources and loading resources, it is tricky to know whether k9s is still loading resources or if there are actually no resources.

Describe the solution you'd like
I would like k9s to display some output when it knows that there are no resources present in the namespace (or context or object space). This could be as simple as what kubectl does:

% kubectl get pods --context mycontext -n mynamespace
No resources found in mynamespace namespace.

Describe alternatives you've considered
Anything that informs the user that k9s has completed loading and that there are no resources present is good enough. I believe the above suggested solutions is the cleanest and simplest one possible where there is just one line printed No resources found in objectspace object. I am not sure, but I think it is not necessary to compare this approach with any other alternatives.

Additional context
N.A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions