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
cf878b93
Commit
cf878b93
authored
Dec 29, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shorten re-read period for token files to work with ProjectedTokenVolumeSource
parent
33174602
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 @
cf878b93
...
@@ -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