Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Add email scope to GCP provided credential refresh #110

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ def __init__(self, config_dict, active_context=None,
self._config_persister = config_persister

def _refresh_credentials():
credentials, project_id = google.auth.default(
scopes=['https://www.googleapis.com/auth/cloud-platform']
)
credentials, project_id = google.auth.default(scopes=[
'https://www.googleapis.com/auth/cloud-platform',
'https://www.googleapis.com/auth/userinfo.email'
])
request = google.auth.transport.requests.Request()
credentials.refresh(request)
return credentials
Expand Down