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

Provide current namespace to InClusterConfig #21095

Merged
merged 1 commit into from
Feb 15, 2016

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Feb 11, 2016

Fixes #21073

@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 11, 2016
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 11, 2016
@liggitt liggitt force-pushed the sa-namespace branch 2 times, most recently from c184ce0 to 3d079b2 Compare February 11, 2016 20:22
@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 11, 2016
// TODO: generic way to figure out what namespace you are running in?
// This way assumes you've set the POD_NAMESPACE environment variable
// using the downward API.
// This way assumes you've set the POD_NAMESPACE environment variable using the downward API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is required for backwards compatibility with old clients

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been prefixed with KUBERNETES_, KUBE_, or somesuch. :-(

Lots of examples use this, but I don't see it actually documented somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree :-(

@smarterclayton
Copy link
Contributor

One question on the tests, then needs @kubernetes/kube-api review (since it adds the constant that is part of the secret, and the secret schema is public API), then LGTM

@smarterclayton
Copy link
Contributor

LGTM pending @bgrant0607's review

@k8s-bot
Copy link

k8s-bot commented Feb 11, 2016

GCE e2e test build/test passed for commit 20216fa.

@@ -375,6 +378,10 @@ func (e *TokensController) generateTokenIfNeeded(serviceAccount *api.ServiceAcco
if needsCA {
secret.Data[api.ServiceAccountRootCAKey] = e.rootCA
}
// Set the namespace
if needsNamespace {
secret.Data[api.ServiceAccountNamespaceKey] = []byte(secret.Namespace)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmorie Note that service account secrets are automatically updated.

@bgrant0607
Copy link
Member

LGTM, but we should document this.

@bgrant0607 bgrant0607 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 11, 2016
@liggitt liggitt added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Feb 12, 2016
@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Feb 13, 2016

GCE e2e test build/test passed for commit 20216fa.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Feb 15, 2016

GCE e2e test build/test passed for commit 20216fa.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Feb 15, 2016

GCE e2e test build/test passed for commit 20216fa.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Feb 15, 2016

GCE e2e test build/test passed for commit 20216fa.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Feb 15, 2016

GCE e2e test build/test passed for commit 20216fa.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Feb 15, 2016
@k8s-github-robot k8s-github-robot merged commit 39a9043 into kubernetes:master Feb 15, 2016
@liggitt liggitt deleted the sa-namespace branch February 15, 2016 14:03
@lavalamp
Copy link
Member

We need to be sure and build a new kubectl container for 1.2 (for use as a side-car in pods). I think we should be doing that anyway as part of the release.

@liggitt
Copy link
Member Author

liggitt commented Feb 16, 2016

I think we should be doing that anyway as part of the release.

I would hope so, if only to get new kubectl features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants