We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 85d1356 + d532cd5 commit f357e29Copy full SHA for f357e29
1 file changed
gce/gce.go
@@ -1240,11 +1240,11 @@ func gceInfo(ctx context.Context, inst *instance) error {
1240
if content["client_email"] != nil {
1241
inst.serviceAccount = fmt.Sprintf("%s", content["client_email"])
1242
} else {
1243
- serviceAccount, err := metadata.Email("")
+ inst.serviceAccount, err = metadata.Email("")
1244
if err != nil {
1245
- return fmt.Errorf("unable to get gce instance service account")
+ // No need to error out for non-GKE compute instances
1246
+ logrus.Warnf("unable to get gce instance service account")
1247
}
- inst.serviceAccount = serviceAccount
1248
1249
return nil
1250
0 commit comments