-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting namespace when no permission to list namespaces #83
Comments
This came up once before in #19. Primarily, not being able to list namespaces straight out makes the Secondarily, Kubernetes has no namespace validity checks for the I'll think about what we can do here. There might be a low-hanging fruit like the one I mentioned above. |
It seems that the feature request in issue 19 is exactly the same as I'm requesting. At the moment they are not able to run Being able to run kubens would make my workflow more consistent and being able to rely on kubens in all cases. As said I think it's very reasonable to validate namespace if that is possible, but it would be nice for users to have option to override this with say the |
I wasn't aware that you can work in a namespace without having permission to get the namespace. I've already worked on being able to switch to a namespace without listing all namespaces. Unluckily there's a validity check which needs to get namespace permission before. See my initial changes tomaaron@cfd4801. @ahmetb If you have another idea what to do when a user isn't able to list/get a namespace but wants change to it, let me know! I'm happy to contribute or adapt my initial changes. |
@tomaaron My concerns around your implementation would be that the check permissions etc causes ~.3-.5s overhead (per kubectl call) times three –for all kubens users. Again, I'm not entirely convinced that Maybe we can add a |
If/when we rewrite this in Go (#115), we can solve this without introducing additional overhead to rest of the |
We have the same issue, no cluster wide option to list namespaces only access granted to known namespaces |
Hello, I have this need also. It would be nice if you can implement this feature or add --force Thank you! |
Hi, |
Not sure why this logic is duplicated in go though (checked this other PR: https://github.com/ahmetb/kubectx/pull/215/files )
Could this issue receive more attention? This kills the whole idea of the tool |
This was fixed for the Go implementation in master with #236. I didn’t make a release for it yet, but feel free to give it a try. |
That's super! Do you plan a release soon? :) |
Hope I get try the new feature soon |
I've tested this with latest version of |
OS: mac
Is it error message related? |
@TreeKat71 likely not. Homebrew still distributes the bash implementation. Please make sure you're checking which executable you have (bash or go). |
Hi @ahmetb, |
Yes but as I said above the fix is in master, but not tagged as a version yet. |
I see. I used the release 0.9. Thanks! I build from master and it works fine! |
We have users that are only allowed to access single namespace in the cluster with very restricted permissions. It would be nice to have option to set namespace to context even when user doesn't have permission to list all namespaces. Ideally
kubens
could verify from user if they want to set namespace even if it can't verify the namespace exists or to have a flag like--force
to set without verifying.This it what happens now even if namespace exists but user doesn't have right to list namespaces:
The text was updated successfully, but these errors were encountered: