-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Stop treating in-cluster-config namespace as an override #44862
Stop treating in-cluster-config namespace as an override #44862
Conversation
Can this fix be backported to 1.5 & 1.6 as well? Thanks! |
@smarterclayton, PTAL, this is changing the behavior introduced in 48b4d6d#diff-093eaa515b227f1070ec0fda3f8e0137R363 |
0ff8a72
to
3dcf5aa
Compare
3dcf5aa
to
1305559
Compare
cc @kubernetes/sig-cli-bugs |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, smarterclayton
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Could we add a v1.5 milestone to close the gap to 1.4, making |
Automatic merge from submit-queue |
We'll see... I opened #44901 in case |
…#44862-upstream-release-1.6 Automatic merge from submit-queue Automated cherry pick of #44570 #44862 Cherry pick of #44570 #44862 on release-1.6. #44570: Explicit namespace from kubeconfig should override in-cluster #44862: Stop treating in-cluster-config namespace as an override ```release-note * kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. * Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. ```
Commit found in the "release-1.6" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
Fixes #44835
The namespace of an in-cluster config should behave like the namespace specified in a kubeconfig file... it should be used as the default namespace, but be able to be overridden by namespaces specified in yaml files passed to
kubectl create -f
.