volume.proto 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.batch.v1;
  16. option csharp_namespace = "Google.Cloud.Batch.V1";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/batch/v1;batch";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "VolumeProto";
  20. option java_package = "com.google.cloud.batch.v1";
  21. option objc_class_prefix = "GCB";
  22. option php_namespace = "Google\\Cloud\\Batch\\V1";
  23. option ruby_package = "Google::Cloud::Batch::V1";
  24. // Volume describes a volume and parameters for it to be mounted to a VM.
  25. message Volume {
  26. // The source for the volume.
  27. oneof source {
  28. // A Network File System (NFS) volume. For example, a
  29. // Filestore file share.
  30. NFS nfs = 1;
  31. // A Google Cloud Storage (GCS) volume.
  32. GCS gcs = 3;
  33. // Device name of an attached disk volume, which should align with a
  34. // device_name specified by
  35. // job.allocation_policy.instances[0].policy.disks[i].device_name or
  36. // defined by the given instance template in
  37. // job.allocation_policy.instances[0].instance_template.
  38. string device_name = 6;
  39. }
  40. // The mount path for the volume, e.g. /mnt/disks/share.
  41. string mount_path = 4;
  42. // For Google Cloud Storage (GCS), mount options are the options supported by
  43. // the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse).
  44. // For existing persistent disks, mount options provided by the
  45. // mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except
  46. // writing are supported. This is due to restrictions of multi-writer mode
  47. // (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).
  48. // For other attached disks and Network File System (NFS), mount options are
  49. // these supported by the mount command
  50. // (https://man7.org/linux/man-pages/man8/mount.8.html).
  51. repeated string mount_options = 5;
  52. }
  53. // Represents an NFS volume.
  54. message NFS {
  55. // The IP address of the NFS.
  56. string server = 1;
  57. // Remote source path exported from the NFS, e.g., "/share".
  58. string remote_path = 2;
  59. }
  60. // Represents a Google Cloud Storage volume.
  61. message GCS {
  62. // Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
  63. // bucket_name, bucket_name/subdirectory/
  64. string remote_path = 1;
  65. }