This repository has been archived by the owner on Oct 3, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix GCP support Updating the pykube[gcp] notice to pykube_ng[gcp]. Updating the scopes passed to the auth query to avoid the following: ``` Scope has changed from "https://www.googleapis.com/auth/cloud-platform" to "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email openid". Traceback (most recent call last): File "/Users/duffy/projects/kube-janitor/kube_janitor/main.py", line 59, in run_loop tiller=tiller File "/Users/duffy/projects/kube-janitor/kube_janitor/janitor.py", line 209, in clean_up for namespace in Namespace.objects(api): File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/query.py", line 133, in __iter__ return iter(self.query_cache["objects"]) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/query.py", line 123, in query_cache cache["response"] = self.execute().json() File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/query.py", line 107, in execute r = self.api.get(**kwargs) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/http.py", line 127, in get return self.session.get(*args, **self.get_kwargs(**kwargs)) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/http.py", line 39, in session self._session = build_session(self.config, self.gcloud_file) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/session.py", line 23, in build_session s = _session_object("gcp", config, gcloud_file) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/session.py", line 47, in _session_object return GCPSession(config, gcloud_file).create() File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/session.py", line 118, in create self._update_token() File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/pykube/session.py", line 129, in _update_token refresh_token=self.credentials.get('refresh_token')) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/requests_oauthlib/oauth2_session.py", line 374, in refresh_token self.token = self._client.parse_request_body_response(r.text, scope=self.scope) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 415, in parse_request_body_response self.token = parse_token_response(body, scope=scope) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 425, in parse_token_response validate_token_parameters(params) File "/Users/duffy/.virtualenvs/default/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 455, in validate_token_parameters raise w Warning: Scope has changed from "https://www.googleapis.com/auth/cloud-platform" to "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email openid". ``` * Review feedback
- Loading branch information