-
Kubernetes Submit Queue authored
Automatic merge from submit-queue (batch tested with PRs 46299, 46309, 46311, 46303, 46150) Fix in-cluster kubectl --namespace override **What this PR does / why we need it**: Before this change, if the config was empty, ConfirmUsable() would return an "invalid configuration" error instead of examining and honoring the value of the --namespace flag. This change looks at the overrides first, and returns the overridden value if it exists before attempting to check if the config is usable. This is most applicable to in-cluster clients, where they don't have a kubeconfig but they do have a token and can use KUBERNETES_SERVICE_HOST/_PORT. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note The --namespace flag is now honored for in-cluster clients that have an empty configuration. ``` @kubernetes/sig-api-machinery-pr-reviews @fabianofranz @liggitt @deads2k @smarterclayton @caesarxuchao @soltysh
3c2e6a9f
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| src/k8s.io | ||
| OWNERS | ||
| README.md | ||
| copy.sh | ||
| godeps-json-updater.go | ||
| prime-apimachinery.sh |