{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes-client/python-base/issues/92","repository_url":"https://api.github.com/repos/kubernetes-client/python-base","labels_url":"https://api.github.com/repos/kubernetes-client/python-base/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes-client/python-base/issues/92/comments","events_url":"https://api.github.com/repos/kubernetes-client/python-base/issues/92/events","html_url":"https://github.com/kubernetes-client/python-base/pull/92","id":367404937,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwODUyNjU2","number":92,"title":"Refresh GCP tokens on retrieval by overriding client config method.","user":{"login":"TrevorEdwards","id":11479672,"node_id":"MDQ6VXNlcjExNDc5Njcy","avatar_url":"https://avatars1.githubusercontent.com/u/11479672?v=4","gravatar_id":"","url":"https://api.github.com/users/TrevorEdwards","html_url":"https://github.com/TrevorEdwards","followers_url":"https://api.github.com/users/TrevorEdwards/followers","following_url":"https://api.github.com/users/TrevorEdwards/following{/other_user}","gists_url":"https://api.github.com/users/TrevorEdwards/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorEdwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorEdwards/subscriptions","organizations_url":"https://api.github.com/users/TrevorEdwards/orgs","repos_url":"https://api.github.com/users/TrevorEdwards/repos","events_url":"https://api.github.com/users/TrevorEdwards/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorEdwards/received_events","type":"User","site_admin":false},"labels":[{"id":982157301,"node_id":"MDU6TGFiZWw5ODIxNTczMDE=","url":"https://api.github.com/repos/kubernetes-client/python-base/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":998402734,"node_id":"MDU6TGFiZWw5OTg0MDI3MzQ=","url":"https://api.github.com/repos/kubernetes-client/python-base/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"open","locked":false,"assignee":{"login":"roycaihw","id":6629765,"node_id":"MDQ6VXNlcjY2Mjk3NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/6629765?v=4","gravatar_id":"","url":"https://api.github.com/users/roycaihw","html_url":"https://github.com/roycaihw","followers_url":"https://api.github.com/users/roycaihw/followers","following_url":"https://api.github.com/users/roycaihw/following{/other_user}","gists_url":"https://api.github.com/users/roycaihw/gists{/gist_id}","starred_url":"https://api.github.com/users/roycaihw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roycaihw/subscriptions","organizations_url":"https://api.github.com/users/roycaihw/orgs","repos_url":"https://api.github.com/users/roycaihw/repos","events_url":"https://api.github.com/users/roycaihw/events{/privacy}","received_events_url":"https://api.github.com/users/roycaihw/received_events","type":"User","site_admin":false},"assignees":[{"login":"roycaihw","id":6629765,"node_id":"MDQ6VXNlcjY2Mjk3NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/6629765?v=4","gravatar_id":"","url":"https://api.github.com/users/roycaihw","html_url":"https://github.com/roycaihw","followers_url":"https://api.github.com/users/roycaihw/followers","following_url":"https://api.github.com/users/roycaihw/following{/other_user}","gists_url":"https://api.github.com/users/roycaihw/gists{/gist_id}","starred_url":"https://api.github.com/users/roycaihw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roycaihw/subscriptions","organizations_url":"https://api.github.com/users/roycaihw/orgs","repos_url":"https://api.github.com/users/roycaihw/repos","events_url":"https://api.github.com/users/roycaihw/events{/privacy}","received_events_url":"https://api.github.com/users/roycaihw/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-10-06T00:18:37Z","updated_at":"2018-11-02T21:08:41Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/kubernetes-client/python-base/pulls/92","html_url":"https://github.com/kubernetes-client/python-base/pull/92","diff_url":"https://github.com/kubernetes-client/python-base/pull/92.diff","patch_url":"https://github.com/kubernetes-client/python-base/pull/92.patch"},"body":"For GCP auth, this overrides the method used by the swagger-generated kubernetes client to get an authorization token, allowing us to use existing python-base code to refresh the GCP auth token. This should [fix #59], as API calls that happen > 1 hour after the client is populated will have the token refreshed around 5 minutes before expiration.\r\n\r\nFor reference, https://github.com/swagger-api/swagger-codegen/blob/4607a90d7b69463a0ae8fc94fac68fc95d80965e/modules/swagger-codegen/src/main/resources/python/configuration.mustache#L215 is the swagger generator and https://github.com/kubernetes-client/python/blob/master/kubernetes/client/configuration.py#L195 is today's generated client.\r\n\r\nI also considered using a custom dict (https://github.com/TrevorEdwards/python-base/commit/d5c8cdc696805bedb4bfd4a8eb8746631c22a276), but that solution seemed too hacky."},"comment":{"url":"https://api.github.com/repos/kubernetes-client/python-base/issues/comments/435509708","html_url":"https://github.com/kubernetes-client/python-base/pull/92#issuecomment-435509708","issue_url":"https://api.github.com/repos/kubernetes-client/python-base/issues/92","id":435509708,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTUwOTcwOA==","user":{"login":"mbohlool","id":1613024,"node_id":"MDQ6VXNlcjE2MTMwMjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1613024?v=4","gravatar_id":"","url":"https://api.github.com/users/mbohlool","html_url":"https://github.com/mbohlool","followers_url":"https://api.github.com/users/mbohlool/followers","following_url":"https://api.github.com/users/mbohlool/following{/other_user}","gists_url":"https://api.github.com/users/mbohlool/gists{/gist_id}","starred_url":"https://api.github.com/users/mbohlool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbohlool/subscriptions","organizations_url":"https://api.github.com/users/mbohlool/orgs","repos_url":"https://api.github.com/users/mbohlool/repos","events_url":"https://api.github.com/users/mbohlool/events{/privacy}","received_events_url":"https://api.github.com/users/mbohlool/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T21:08:41Z","updated_at":"2018-11-02T21:08:41Z","author_association":"MEMBER","body":"/lgtm"}}
{"actor":{"display_login":"mbohlool"}}