Skip to content

Commit 12b32ef

Browse files
Google APIscopybara-github
authored andcommitted
feat: support custom scopes for service account in v1
--- feat: Add boot disk field in InstanceStatus --- feat: Add boot disk and image source fields to v1 InstancePolicy PiperOrigin-RevId: 507014714
1 parent b936f4e commit 12b32ef

2 files changed

Lines changed: 24 additions & 6 deletions

File tree

google/cloud/batch/v1alpha/batch.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ syntax = "proto3";
1616

1717
package google.cloud.batch.v1alpha;
1818

19-
import public "google/protobuf/empty.proto";
20-
2119
import "google/api/annotations.proto";
2220
import "google/api/client.proto";
2321
import "google/api/field_behavior.proto";

google/cloud/batch/v1alpha/job.proto

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ message JobStatus {
173173

174174
// The max number of tasks can be assigned to this instance type.
175175
int64 task_pack = 3;
176+
177+
// The VM boot disk.
178+
AllocationPolicy.Disk boot_disk = 4;
176179
}
177180

178181
// Aggregated task status for a TaskGroup.
@@ -298,20 +301,37 @@ message AllocationPolicy {
298301
// A data source from which a PD will be created.
299302
oneof data_source {
300303
// Name of a public or custom image used as the data source.
304+
// For example, the following are all valid URLs:
305+
// (1) Specify the image by its family name:
306+
// projects/{project}/global/images/family/{image_family}
307+
// (2) Specify the image version:
308+
// projects/{project}/global/images/{image_version}
309+
// You can also use Batch customized image in short names.
310+
// The following image values are supported for a boot disk:
311+
// "batch-debian": use Batch Debian images.
312+
// "batch-centos": use Batch CentOS images.
313+
// "batch-cos": use Batch Container-Optimized images.
301314
string image = 4;
302315

303316
// Name of a snapshot used as the data source.
304317
string snapshot = 5;
305318
}
306319

307-
// Disk type as shown in `gcloud compute disk-types list`
308-
// For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd".
320+
// Disk type as shown in `gcloud compute disk-types list`.
321+
// For example, local SSD uses type "local-ssd".
322+
// Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd"
323+
// or "pd-standard".
309324
string type = 1;
310325

311326
// Disk size in GB.
312-
// This field is ignored if `data_source` is `disk` or `image`.
313-
// If `type` is `local-ssd`, size_gb should be a multiple of 375GB,
327+
// For persistent disk, this field is ignored if `data_source` is `image` or
328+
// `snapshot`.
329+
// For local SSD, size_gb should be a multiple of 375GB,
314330
// otherwise, the final size will be the next greater multiple of 375 GB.
331+
// For boot disk, Batch will calculate the boot disk size based on source
332+
// image and task requirements if you do not speicify the size.
333+
// If both this field and the boot_disk_mib field in task spec's
334+
// compute_resource are defined, Batch will only honor this field.
315335
int64 size_gb = 2;
316336

317337
// Local SSDs are available through both "SCSI" and "NVMe" interfaces.

0 commit comments

Comments
 (0)