generated.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. Copyright The Kubernetes Authors.
  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. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file was autogenerated by go-to-protobuf. Do not edit it manually!
  14. syntax = 'proto2';
  15. package k8s.io.api.storage.v1alpha1;
  16. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  19. // Package-wide variables from generator "generated".
  20. option go_package = "v1alpha1";
  21. // VolumeAttachment captures the intent to attach or detach the specified volume
  22. // to/from the specified node.
  23. //
  24. // VolumeAttachment objects are non-namespaced.
  25. message VolumeAttachment {
  26. // Standard object metadata.
  27. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  28. // +optional
  29. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  30. // Specification of the desired attach/detach volume behavior.
  31. // Populated by the Kubernetes system.
  32. optional VolumeAttachmentSpec spec = 2;
  33. // Status of the VolumeAttachment request.
  34. // Populated by the entity completing the attach or detach
  35. // operation, i.e. the external-attacher.
  36. // +optional
  37. optional VolumeAttachmentStatus status = 3;
  38. }
  39. // VolumeAttachmentList is a collection of VolumeAttachment objects.
  40. message VolumeAttachmentList {
  41. // Standard list metadata
  42. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  43. // +optional
  44. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  45. // Items is the list of VolumeAttachments
  46. repeated VolumeAttachment items = 2;
  47. }
  48. // VolumeAttachmentSource represents a volume that should be attached.
  49. // Right now only PersistenVolumes can be attached via external attacher,
  50. // in future we may allow also inline volumes in pods.
  51. // Exactly one member can be set.
  52. message VolumeAttachmentSource {
  53. // Name of the persistent volume to attach.
  54. // +optional
  55. optional string persistentVolumeName = 1;
  56. }
  57. // VolumeAttachmentSpec is the specification of a VolumeAttachment request.
  58. message VolumeAttachmentSpec {
  59. // Attacher indicates the name of the volume driver that MUST handle this
  60. // request. This is the name returned by GetPluginName().
  61. optional string attacher = 1;
  62. // Source represents the volume that should be attached.
  63. optional VolumeAttachmentSource source = 2;
  64. // The node that the volume should be attached to.
  65. optional string nodeName = 3;
  66. }
  67. // VolumeAttachmentStatus is the status of a VolumeAttachment request.
  68. message VolumeAttachmentStatus {
  69. // Indicates the volume is successfully attached.
  70. // This field must only be set by the entity completing the attach
  71. // operation, i.e. the external-attacher.
  72. optional bool attached = 1;
  73. // Upon successful attach, this field is populated with any
  74. // information returned by the attach operation that must be passed
  75. // into subsequent WaitForAttach or Mount calls.
  76. // This field must only be set by the entity completing the attach
  77. // operation, i.e. the external-attacher.
  78. // +optional
  79. map<string, string> attachmentMetadata = 2;
  80. // The last error encountered during attach operation, if any.
  81. // This field must only be set by the entity completing the attach
  82. // operation, i.e. the external-attacher.
  83. // +optional
  84. optional VolumeError attachError = 3;
  85. // The last error encountered during detach operation, if any.
  86. // This field must only be set by the entity completing the detach
  87. // operation, i.e. the external-attacher.
  88. // +optional
  89. optional VolumeError detachError = 4;
  90. }
  91. // VolumeError captures an error encountered during a volume operation.
  92. message VolumeError {
  93. // Time the error was encountered.
  94. // +optional
  95. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
  96. // String detailing the error encountered during Attach or Detach operation.
  97. // This string maybe logged, so it should not contain sensitive
  98. // information.
  99. // +optional
  100. optional string message = 2;
  101. }