-
Notifications
You must be signed in to change notification settings - Fork 42.1k
Shorten re-read period for token files to work with ProjectedTokenVolumeSource #72437
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
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
| // refreshes a projected service account token and when the original token expires. | ||
| // Default token lifetime is 10 minutes, and the kubelet starts refreshing at 80% of lifetime. | ||
| // This should induce re-reading at a frequency that works with the token volume source. | ||
| period: time.Minute, |
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.
- Does this period control the client-go reload of the token after it has been refreshed by the kubelet ?
- Is it configurable ?
- If yes to 1, isnt this dependent on the
expirationSecondsin the projected volume ?
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.
It does control the refresh period. It is not configurable. expirationSeconds must be at least 10 minutes
|
/lgtm |
…7-upstream-release-1.13 Automated cherry pick of #72437: Shorten re-read period for token files to work with
…7-upstream-release-1.12 Automated cherry pick of #72437: Shorten re-read period for token files to work with
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes the token file cache period to be short enough to observe refreshed service account tokens before the original expires.
The original 5 minute window (actually 4 minutes because of the 1 minute leeway) could prevent reading a token refreshed 1 second after the last read and expiring 2 minutes later.
Does this PR introduce a user-facing change?:
/cc @mikedanese
/sig auth