xref: /aosp_15_r20/external/googleapis/google/cloud/batch/v1alpha/volume.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.batch.v1alpha;
18
19option csharp_namespace = "Google.Cloud.Batch.V1Alpha";
20option go_package = "cloud.google.com/go/batch/apiv1alpha/batchpb;batchpb";
21option java_multiple_files = true;
22option java_outer_classname = "VolumeProto";
23option java_package = "com.google.cloud.batch.v1alpha";
24option objc_class_prefix = "GCB";
25option php_namespace = "Google\\Cloud\\Batch\\V1alpha";
26option ruby_package = "Google::Cloud::Batch::V1alpha";
27
28// Volume describes a volume and parameters for it to be mounted to a VM.
29message Volume {
30  // The source for the volume.
31  oneof source {
32    // A Network File System (NFS) volume. For example, a
33    // Filestore file share.
34    NFS nfs = 1;
35
36    // Deprecated: please use device_name instead.
37    PD pd = 2 [deprecated = true];
38
39    // A Google Cloud Storage (GCS) volume.
40    GCS gcs = 3;
41
42    // Device name of an attached disk volume, which should align with a
43    // device_name specified by
44    // job.allocation_policy.instances[0].policy.disks[i].device_name or
45    // defined by the given instance template in
46    // job.allocation_policy.instances[0].instance_template.
47    string device_name = 6;
48  }
49
50  // The mount path for the volume, e.g. /mnt/disks/share.
51  string mount_path = 4;
52
53  // For Google Cloud Storage (GCS), mount options are the options supported by
54  // the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse).
55  // For existing persistent disks, mount options provided by the
56  // mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except
57  // writing are supported. This is due to restrictions of multi-writer mode
58  // (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).
59  // For other attached disks and Network File System (NFS), mount options are
60  // these supported by the mount command
61  // (https://man7.org/linux/man-pages/man8/mount.8.html).
62  repeated string mount_options = 5;
63}
64
65// Represents an NFS volume.
66message NFS {
67  // The IP address of the NFS.
68  string server = 1;
69
70  // Remote source path exported from the NFS, e.g., "/share".
71  string remote_path = 2;
72}
73
74// Deprecated: please use device_name instead.
75message PD {
76  // PD disk name, e.g. pd-1.
77  string disk = 1;
78
79  // PD device name, e.g. persistent-disk-1.
80  string device = 2;
81
82  // Whether this is an existing PD. Default is false. If false, i.e., new
83  // PD, we will format it into ext4 and mount to the given path. If true, i.e.,
84  // existing PD, it should be in ext4 format and we will mount it to the given
85  // path.
86  bool existing = 3 [deprecated = true];
87}
88
89// Represents a Google Cloud Storage volume.
90message GCS {
91  // Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
92  // bucket_name, bucket_name/subdirectory/
93  string remote_path = 1;
94}
95