Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
de4e1ce4
Unverified
Commit
de4e1ce4
authored
Jan 07, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72437 from liggitt/shorten-token-re-read
Shorten re-read period for token files to work with ProjectedTokenVolumeSource
parents
cd507fea
a432a7cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
token_source.go
staging/src/k8s.io/client-go/transport/token_source.go
+6
-6
No files found.
staging/src/k8s.io/client-go/transport/token_source.go
View file @
de4e1ce4
...
@@ -47,14 +47,14 @@ func TokenSourceWrapTransport(ts oauth2.TokenSource) func(http.RoundTripper) htt
...
@@ -47,14 +47,14 @@ func TokenSourceWrapTransport(ts oauth2.TokenSource) func(http.RoundTripper) htt
func
NewCachedFileTokenSource
(
path
string
)
oauth2
.
TokenSource
{
func
NewCachedFileTokenSource
(
path
string
)
oauth2
.
TokenSource
{
return
&
cachingTokenSource
{
return
&
cachingTokenSource
{
now
:
time
.
Now
,
now
:
time
.
Now
,
leeway
:
1
*
time
.
Minute
,
leeway
:
1
0
*
time
.
Second
,
base
:
&
fileTokenSource
{
base
:
&
fileTokenSource
{
path
:
path
,
path
:
path
,
// This period was picked because it is half of the
minimum validity
// This period was picked because it is half of the
duration between when the kubelet
//
duration for a token provisioned by they TokenRequest API. This is
//
refreshes a projected service account token and when the original token expires.
//
unsophisticated and should induce rotation at a frequency that should
//
Default token lifetime is 10 minutes, and the kubelet starts refreshing at 80% of lifetime.
//
work
with the token volume source.
//
This should induce re-reading at a frequency that works
with the token volume source.
period
:
5
*
time
.
Minute
,
period
:
time
.
Minute
,
},
},
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment