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

Commit 1d5231c

Browse files
authored
Merge pull request #110 from axelsteingrimsson/add_email_scope_to_gcp_credentials_refresh
Add email scope to GCP provided credential refresh
2 parents 5c03b3b + 1637d56 commit 1d5231c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/kube_config.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ def __init__(self, config_dict, active_context=None,
155155
self._config_persister = config_persister
156156

157157
def _refresh_credentials():
158-
credentials, project_id = google.auth.default(
159-
scopes=['https://www.googleapis.com/auth/cloud-platform']
160-
)
158+
credentials, project_id = google.auth.default(scopes=[
159+
'https://www.googleapis.com/auth/cloud-platform',
160+
'https://www.googleapis.com/auth/userinfo.email'
161+
])
161162
request = google.auth.transport.requests.Request()
162163
credentials.refresh(request)
163164
return credentials

0 commit comments

Comments
 (0)