Skip to content
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

Merged
merged 1 commit into from Apr 25, 2017

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Apr 24, 2017

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.

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.

@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 24, 2017
@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Apr 24, 2017
@pieterlange
Copy link

Can this fix be backported to 1.5 & 1.6 as well? Thanks!

@liggitt
Copy link
Member Author

liggitt commented Apr 24, 2017

@smarterclayton, PTAL, this is changing the behavior introduced in 48b4d6d#diff-093eaa515b227f1070ec0fda3f8e0137R363

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 24, 2017
@liggitt liggitt added this to the v1.6 milestone Apr 24, 2017
@k8s-github-robot k8s-github-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Apr 24, 2017
@liggitt
Copy link
Member Author

liggitt commented Apr 24, 2017

cc @kubernetes/sig-cli-bugs

@smarterclayton
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 24, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2017
@pieterlange
Copy link

pieterlange commented Apr 24, 2017

Could we add a v1.5 milestone to close the gap to 1.4, making kubectl work as expected on all versions?

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit c3ec845 into kubernetes:master Apr 25, 2017
@liggitt liggitt deleted the icc-namespace-override branch April 25, 2017 03:54
@liggitt
Copy link
Member Author

liggitt commented Apr 25, 2017

Could we add a v1.5 milestone to close the gap to 1.4, making kubectl work as expected on all versions?

We'll see... I opened #44901 in case

k8s-github-robot pushed a commit that referenced this pull request Apr 25, 2017
…#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.
```
@k8s-cherrypick-bot
Copy link

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.

k8s-github-robot pushed a commit that referenced this pull request Jun 5, 2017
…#44862-upstream-release-1.5

Automatic merge from submit-queue

Automated cherry pick of #44570 #44862

Cherry pick of #44570 #44862 on release-1.5.

#44570: Explicit namespace from kubeconfig should override in-cluster
#44862: Stop treating in-cluster-config namespace as an override
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants