profiler: StartInstance should allow specify cloud API access scopes
@@ -129,6 +129,7 @@ type InstanceConfig struct {
MachineType string
ImageProject string
ImageFamily string
+ Scopes []string
}
// ClusterConfig is configuration for starting single GKE cluster for profiling
@@ -245,9 +246,7 @@ func (tr *GCETestRunner) StartInstance(ctx context.Context, inst *InstanceConfig
},
ServiceAccounts: []*compute.ServiceAccount{{
Email: "default",
- Scopes: []string{
- monitorWriteScope,
- },
+ Scopes: append(inst.Scopes, monitorWriteScope),
}},
}).Do()
