mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-08 16:30:57 -04:00
Merge pull request #101170 from jeremyje/fixscopes
GCE Windows: Use authenticated HTTP GET against GCS if VM has cloud-p…
This commit is contained in:
commit
2342ac3cfa
1 changed files with 2 additions and 2 deletions
|
|
@ -248,7 +248,7 @@ function Get-RemoteFile {
|
|||
$httpResponseMessage.Wait()
|
||||
if (-not $httpResponseMessage.IsCanceled) {
|
||||
# Check if the request was successful.
|
||||
#
|
||||
#
|
||||
# DO NOT replace with EnsureSuccessStatusCode(), it prints the
|
||||
# OAuth2 bearer token.
|
||||
if (-not $httpResponseMessage.Result.IsSuccessStatusCode) {
|
||||
|
|
@ -295,7 +295,7 @@ function Check-StorageScope {
|
|||
While($true) {
|
||||
$data = Get-InstanceMetadata -Key "service-accounts/default/scopes"
|
||||
if ($data) {
|
||||
return ($data -match "auth/devstorage")
|
||||
return ($data -match "auth/devstorage") -or ($data -match "auth/cloud-platform")
|
||||
}
|
||||
Start-Sleep -Seconds 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue