Skip to content

Commit de6760b

Browse files
Google APIscopybara-github
authored andcommitted
feat: add InstancePolicy.reservation field for restricting jobs to a specific reservation
--- docs: elaborate the usage of Container.volumes proto field PiperOrigin-RevId: 570165566
1 parent 306d73d commit de6760b

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

google/cloud/batch/v1/job.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ message AllocationPolicy {
268268
// * `batch-centos`: use Batch CentOS images.
269269
// * `batch-cos`: use Batch Container-Optimized images.
270270
// * `batch-hpc-centos`: use Batch HPC CentOS images.
271+
// * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
271272
string image = 4;
272273

273274
// Name of a snapshot used as the data source.
@@ -377,6 +378,10 @@ message AllocationPolicy {
377378
// file system or a raw storage drive that is not ready for data
378379
// storage and accessing.
379380
repeated AttachedDisk disks = 6;
381+
382+
// Optional. If specified, VMs will consume only the specified reservation.
383+
// If not specified (default), VMs will consume any applicable reservation.
384+
string reservation = 7 [(google.api.field_behavior) = OPTIONAL];
380385
}
381386

382387
// InstancePolicyOrTemplate lets you define the type of resources to use for

google/cloud/batch/v1/task.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ message Runnable {
159159
// Volumes to mount (bind mount) from the host machine files or directories
160160
// into the container, formatted to match docker run's --volume option,
161161
// e.g. /foo:/bar, or /foo:/bar:ro
162+
//
163+
// If the `TaskSpec.Volumes` field is specified but this field is not, Batch
164+
// will mount each volume from the host machine to the container with the
165+
// same mount path by default. In this case, the default mount option for
166+
// containers will be read-only (ro) for existing persistent disks and
167+
// read-write (rw) for other volume types, regardless of the original mount
168+
// options specified in `TaskSpec.Volumes`. If you need different mount
169+
// settings, you can explicitly configure them in this field.
162170
repeated string volumes = 7;
163171

164172
// Arbitrary additional options to include in the "docker run" command when

0 commit comments

Comments
 (0)