-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Use token file for in cluster config during e2e tests #69273
Use token file for in cluster config during e2e tests #69273
Conversation
@dims did you verify this patch works properly? |
Doing that right now @timothysc |
tested using https://paste.fedoraproject.org/paste/2uDC5PK6UDQQBu5QgJyIoA/raw the change looks good - https://paste.fedoraproject.org/paste/Yx51HND8kz~otYPjl~JGGA/raw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
I would like those who made the client-go changes to lgtm this.
/assign @mikedanese cc @darxkies |
test/e2e/framework/test_context.go
Outdated
@@ -335,14 +335,17 @@ func ViperizeFlags() { | |||
} | |||
|
|||
func createKubeConfig(clientCfg *restclient.Config) *clientcmdapi.Config { | |||
const ( | |||
tokenFile = "/var/run/secrets/kubernetes.io/serviceaccount/token" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for a full const block (or for this to be a const in general)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. thanks @mikedanese
lgtm, thanks for fixing! |
Change-Id: I08e792d7c4db2d81861eec6f91028ebf26dea8db
8697a8b
to
57f1f6e
Compare
this seems ok as a quick fix, though it's unclear where this file is expected to be used from, and whether it is intended to be portable outside the generating environment. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, liggitt, timothysc 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 |
…pstream-release-1.12 Automated cherry pick of #69273: Use token file for in cluster config during e2e tests
Follow up in #71713 |
Change-Id: I08e792d7c4db2d81861eec6f91028ebf26dea8db
What this PR does / why we need it:
In 287f6a5#diff-063e73bab84834a4187b1ad4865050adL337, we stopped initializing BearerToken. We did this because the token file mounted into the container is likely to change, so that PR had a mechanism to re-load the file and pick up new tokens when appropriate. So what we should do to keep the old functionality is to use the token file directly in the temporary kubeconfig we generate.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #69234
Special notes for your reviewer:
Release note: