Uh oh!
There was an error while loading. Please reload this page.
set expiration on token of incluster config and reload if expires - #191
Conversation
k8s-ci-robot
commented
Apr 13, 2020
Welcome @zshihang! |
roycaihw
commented
Apr 13, 2020
/cc |
zshihang
commented
Apr 14, 2020
/assign @roycaihw |
codecov-io
commented
Apr 22, 2020
Codecov Report
@@ Coverage Diff @@## master #191 +/- ##
=======================================
Coverage 92.23% 92.24% =======================================
Files 13 13 Lines 1481 1521 +40 =======================================
+ Hits 1366 1403 +37 - Misses 115 118 +3
Continue to review full report at Codecov.
|
| if identifier == 'authorization' and identifier in self.api_key and in_cluster_config.token_expires_at <= datetime.datetime.now(): | ||
| in_cluster_config._read_token_file() | ||
| self.api_key[identifier] = "bearer " + in_cluster_config.token | ||
| return f(self, identifier) |
There was a problem hiding this comment.
nit: I'm a little concerned what if someone calls load_and_set more than once in the same program. Will we end up with nested if conditions?
There was a problem hiding this comment.
good point. i assumed load_and_set will only be called once. maybe enforce this restriction in a separate PR
k8s-ci-robot
commented
Apr 27, 2020
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roycaihw, zshihang 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 |
fixeskubernetes-client/python/issues/616. by default, this will set an expiration period of 1 minutes on service account token. as we are graduating the Beta feature Projected Service Account Volume to GA, we expect clients to reload token before it expires.