-
Notifications
You must be signed in to change notification settings - Fork 184
Add option to refresh gcp token when config is cmd-path #175
Conversation
Looks like the test is failing on python style code problems on unrelated files (not thouched in that review). /tmp/tmp.0CpklmniPV/python/kubernetes/utils/quantity.py:24:80: E501 line too long (91 > 79 characters) |
/assign @yliaog |
The CI is failing on the files you modified. Take a look at the diff output - or to save time, just use E501 is ignored in judging the success of the CI task. |
Oops, yes. Fixed, build seems to pass now. |
Hi, Any chance to have this reviewed? |
config/kube_config.py
Outdated
@@ -133,6 +135,47 @@ def as_data(self): | |||
return self._data | |||
|
|||
|
|||
class CommandTokenSource(object): | |||
def __init__(self, cmd, args, tokenKey, expiryKey): | |||
|
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.
why the extra blank line here?
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.
Fixed (when PR will be updated)
config/kube_config_test.py
Outdated
@@ -1439,7 +1444,8 @@ def test_list_kube_config_contexts(self): | |||
{'context': {'cluster': 'ssl', 'user': 'ssl'}, 'name': 'ssl'}, | |||
{'context': {'cluster': 'default', 'user': 'simple_token'}, | |||
'name': 'simple_token'}, | |||
{'context': {'cluster': 'default', 'user': 'expired_oidc'}, 'name': 'expired_oidc'}] | |||
{'context': {'cluster': 'default', 'user': 'expired_oidc'}, | |||
'name': 'expired_oidc'}] |
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.
please add a test case
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.
Working on it.
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.
Added tests and updated the PR.
Codecov Report
@@ Coverage Diff @@
## master #175 +/- ##
==========================================
- Coverage 93.41% 92.46% -0.95%
==========================================
Files 13 13
Lines 1398 1474 +76
==========================================
+ Hits 1306 1363 +57
- Misses 92 111 +19
Continue to review full report at Codecov.
|
ebb2bc7
to
eeb8b54
Compare
0ee3cb5
to
d3bc0a9
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jfrabaute, yliaog 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 |
Note to self: We should add documentation for the functionality implemented here. /cc cc: @roycaihw |
The python client does not deal with "gcloud" gke auth in the kube config file as it's based on the "cmd-path" auth.
This is adding the code to take care of this auth.
This should solve kubernetes-client/python#754