You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.Warnf("error when read token request for getting IMDSv2 token: %s. No token in the metadata request will be used.", err)
87
+
return""
88
+
}
89
+
90
+
ifrsp.StatusCode!=http.StatusOK {
91
+
logger.Warnf("error when check request status for getting IMDSv2 token: http request status %d. No token in the metadata request will be used.", rsp.StatusCode)
92
+
return""
93
+
}
94
+
95
+
all, err:=ioutil.ReadAll(rsp.Body)
96
+
iferr!=nil {
97
+
logger.Warnf("error when reading token request for getting IMDSv2 token: %s. No token in the metadata request will be used.", err)
98
+
return""
99
+
}
100
+
101
+
returnstring(all)
102
+
}
27
103
28
104
// AWS EC2 Metadata Service
29
105
varec2MetadataFetcher=provider{
@@ -48,7 +124,13 @@ var ec2MetadataFetcher = provider{
0 commit comments