-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flag to opt out of existence check when switching namespaces
We have a tool that chooses a cluster and namespace based on runtime data, and by the time we have decided what cluster and namespace to connect to, we already know that the namespace exists in the cluster. We want to extend this tool to support multiple switching mechanisms (rather than just `kubectl config use-context` and `kubectl config set-context`), and but the existence check for the namespace is prohibitively slow on some of our clusters. To avoid paying that penalty, this change adds a flag to `switch ns` which allows the user to opt out of the existence check. ``` λ switch ns does-not-exist namespace "does-not-exist" not foundexit status 1 λ switch ns does-not-exist --check-existence=false ```
- Loading branch information
1 parent
b0f508e
commit 894a1cd
Showing
2 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters