Skip to content

Plumb token and token file through rest.Config #71713

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

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Dec 4, 2018

What type of PR is this?
/kind bug

What this PR does / why we need it:

  • Restores the tokenFile -> bearer token population in rest.Config
  • Plumbs tokenFile info through to the bearer token round tripper, and sets up periodic read during client construction

Which issue(s) this PR fixes:
xref #69234
alternative to #69272

Does this PR introduce a user-facing change?:

client-go: restores behavior of populating the BearerToken field in rest.Config objects constructed from kubeconfig files containing tokenFile config, or from in-cluster configuration. An additional BearerTokenFile field is now populated to enable constructed clients to periodically refresh tokens.

/assign @smarterclayton @mikedanese
/sig api-machinery
/sig auth

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Dec 4, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 4, 2018
@k8s-ci-robot k8s-ci-robot added area/apiserver area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Dec 4, 2018
@liggitt
Copy link
Member Author

liggitt commented Dec 4, 2018

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 4, 2018
@smarterclayton
Copy link
Contributor

This is beautiful.

@luxas
Copy link
Member

luxas commented Dec 4, 2018

@kubernetes/sig-cluster-lifecycle

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2018
@smarterclayton
Copy link
Contributor

smarterclayton commented Dec 4, 2018 via email

@liggitt
Copy link
Member Author

liggitt commented Dec 4, 2018

/retest

@liggitt liggitt added this to the v1.13 milestone Dec 4, 2018
@liggitt
Copy link
Member Author

liggitt commented Dec 4, 2018

candidate for picking to 1.13 for client-go consumers

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Dec 4, 2018

@liggitt: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-local-e2e-containerized debc6db83b63a50f2b147e42aa295eec7d626060 link /test pull-kubernetes-local-e2e-containerized

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-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 Dec 4, 2018
@mikedanese
Copy link
Member

This packages are very non-idiomatic go ;(

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 4, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, mikedanese

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 2bd14ea into kubernetes:master Dec 4, 2018
@liggitt liggitt deleted the tokenfile-reload branch December 5, 2018 06:19
k8s-ci-robot added a commit that referenced this pull request Dec 12, 2018
…3-upstream-release-1.13

Automated cherry pick of #71713, #71857: Plumb token and token file through rest.Config
k8s-ci-robot added a commit that referenced this pull request Jan 11, 2019
…#71857-upstream-release-1.12

Automated cherry pick of #71713: Plumb token and token file through rest.Config #71857: plumb bearer token and token file for e2e
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. area/apiserver area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/node Categorizes an issue or PR as relevant to SIG Node. 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.

5 participants