Skip to content

Commit 1637d56

Browse files
Add email scope to GCP provided credential refresh
1 parent 5c242ea commit 1637d56

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/kube_config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ def __init__(self, config_dict, active_context=None,
141141
self._config_persister = config_persister
142142

143143
def _refresh_credentials():
144-
credentials, project_id = google.auth.default(
145-
scopes=['https://www.googleapis.com/auth/cloud-platform']
146-
)
144+
credentials, project_id = google.auth.default(scopes=[
145+
'https://www.googleapis.com/auth/cloud-platform',
146+
'https://www.googleapis.com/auth/userinfo.email'
147+
])
147148
request = google.auth.transport.requests.Request()
148149
credentials.refresh(request)
149150
return credentials

0 commit comments

Comments
 (0)