kdash icon indicating copy to clipboard operation
kdash copied to clipboard

Context with no permission to enumerate other namespaces will not enumerate pods

Open AnsonT opened this issue 3 years ago • 2 comments

Describe the bug If the user of the active context does not have permission to enumerate other namespaces, etc., errors will be shown and no pods are listed in the current namespace even though it's permitted for the user

To Reproduce Steps to reproduce the behavior or a screencast

  • select a context with permission restrictions

Expected behavior

  • resources that the user have permission to view will be shown
  • resources that the user does not have permission to view will not be shown (perhaps a 'no permission' message be presented)

Desktop (please complete the following information): MacOS 11.5 iTerm2 3.4.8 Bash 5.1.8 Kubectl Client Version 1.21.0 Kubectl Server Version 1.19 KDash version 0.2.3 Installed from homebrew

AnsonT avatar Aug 05 '21 19:08 AnsonT

Thaks for the report. I think I need to check permission and fail gracefully in this case

deepu105 avatar Aug 05 '21 22:08 deepu105

This would be a nice fix. In my case, I have the namespace I have permission for in my kubeconfig contexts definition. Would it be sufficient for kdash to simply check that and if it's defined, just use that namespace and skip the get namespace cmd?

mennthor avatar Nov 10 '22 12:11 mennthor