Skip to content

Commit 58e44c9

Browse files
feat: [batch] add InstancePolicy.reservation field for restricting jobs to a specific reservation (#4727)
* feat: Add the support for the batch hpc rocky linux image --- feat: add InstancePolicy.reservation field for restricting jobs to a specific reservation --- docs: elaborate the usage of Container.volumes proto field PiperOrigin-RevId: 570148633 Source-Link: googleapis/googleapis@b7aec3f Source-Link: googleapis/googleapis-gen@84ca8d0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI4NGNhOGQwOWFlNmVhZjcyOTM1NzJkNzg3ZjJmMWE5NmQ3ZjI5NWVlIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add InstancePolicy.reservation field for restricting jobs to a specific reservation --- docs: elaborate the usage of Container.volumes proto field PiperOrigin-RevId: 570165566 Source-Link: googleapis/googleapis@de6760b Source-Link: googleapis/googleapis-gen@8a604d8 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI4YTYwNGQ4Yzc4ZjJjN2YxNTAyNzdlYTNiMmY1M2Y4Mjk2MmFiYjU1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Daniel Bankhead <danielbankhead@google.com>
1 parent 141bbd2 commit 58e44c9

7 files changed

Lines changed: 64 additions & 3 deletions

File tree

packages/google-cloud-batch/protos/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

packages/google-cloud-batch/protos/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

packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ message AllocationPolicy {
332332
// * `batch-centos`: use Batch CentOS images.
333333
// * `batch-cos`: use Batch Container-Optimized images.
334334
// * `batch-hpc-centos`: use Batch HPC CentOS images.
335+
// * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
335336
string image = 4;
336337

337338
// Name of a snapshot used as the data source.
@@ -445,9 +446,9 @@ message AllocationPolicy {
445446
// storage and accessing.
446447
repeated AttachedDisk disks = 6;
447448

448-
// If specified, VMs will consume only the specified reservation.
449+
// Optional. If specified, VMs will consume only the specified reservation.
449450
// If not specified (default), VMs will consume any applicable reservation.
450-
string reservation = 7;
451+
string reservation = 7 [(google.api.field_behavior) = OPTIONAL];
451452
}
452453

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

packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ message Runnable {
178178
// Volumes to mount (bind mount) from the host machine files or directories
179179
// into the container, formatted to match docker run's --volume option,
180180
// e.g. /foo:/bar, or /foo:/bar:ro
181+
//
182+
// If the `TaskSpec.Volumes` field is specified but this field is not, Batch
183+
// will mount each volume from the host machine to the container with the
184+
// same mount path by default. In this case, the default mount option for
185+
// containers will be read-only (ro) for existing persistent disks and
186+
// read-write (rw) for other volume types, regardless of the original mount
187+
// options specified in `TaskSpec.Volumes`. If you need different mount
188+
// settings, you can explicitly configure them in this field.
181189
repeated string volumes = 7;
182190

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

packages/google-cloud-batch/protos/protos.d.ts

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-batch/protos/protos.js

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-batch/protos/protos.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)