Skip to content

Commit

Permalink
feat: add InstancePolicy.reservation field for restricting jobs to a …
Browse files Browse the repository at this point in the history
…specific reservation

---
docs: elaborate the usage of Container.volumes proto field
PiperOrigin-RevId: 570165566
  • Loading branch information
Google APIs authored and Copybara-Service committed Oct 2, 2023
1 parent 306d73d commit de6760b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions google/cloud/batch/v1/job.proto
Expand Up @@ -268,6 +268,7 @@ message AllocationPolicy {
// * `batch-centos`: use Batch CentOS images.
// * `batch-cos`: use Batch Container-Optimized images.
// * `batch-hpc-centos`: use Batch HPC CentOS images.
// * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
string image = 4;

// Name of a snapshot used as the data source.
Expand Down Expand Up @@ -377,6 +378,10 @@ message AllocationPolicy {
// file system or a raw storage drive that is not ready for data
// storage and accessing.
repeated AttachedDisk disks = 6;

// Optional. If specified, VMs will consume only the specified reservation.
// If not specified (default), VMs will consume any applicable reservation.
string reservation = 7 [(google.api.field_behavior) = OPTIONAL];
}

// InstancePolicyOrTemplate lets you define the type of resources to use for
Expand Down
8 changes: 8 additions & 0 deletions google/cloud/batch/v1/task.proto
Expand Up @@ -159,6 +159,14 @@ message Runnable {
// Volumes to mount (bind mount) from the host machine files or directories
// into the container, formatted to match docker run's --volume option,
// e.g. /foo:/bar, or /foo:/bar:ro
//
// If the `TaskSpec.Volumes` field is specified but this field is not, Batch
// will mount each volume from the host machine to the container with the
// same mount path by default. In this case, the default mount option for
// containers will be read-only (ro) for existing persistent disks and
// read-write (rw) for other volume types, regardless of the original mount
// options specified in `TaskSpec.Volumes`. If you need different mount
// settings, you can explicitly configure them in this field.
repeated string volumes = 7;

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

0 comments on commit de6760b

Please sign in to comment.