generated.proto 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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/api/core/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
  18. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  19. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  20. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  21. // Package-wide variables from generator "generated".
  22. option go_package = "v1alpha1";
  23. // CSIStorageCapacity stores the result of one CSI GetCapacity call.
  24. // For a given StorageClass, this describes the available capacity in a
  25. // particular topology segment. This can be used when considering where to
  26. // instantiate new PersistentVolumes.
  27. //
  28. // For example this can express things like:
  29. // - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1"
  30. // - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123"
  31. //
  32. // The following three cases all imply that no capacity is available for
  33. // a certain combination:
  34. // - no object exists with suitable topology and storage class name
  35. // - such an object exists, but the capacity is unset
  36. // - such an object exists, but the capacity is zero
  37. //
  38. // The producer of these objects can decide which approach is more suitable.
  39. //
  40. // This is an alpha feature and only available when the CSIStorageCapacity feature is enabled.
  41. message CSIStorageCapacity {
  42. // Standard object's metadata. The name has no particular meaning. It must be
  43. // be a DNS subdomain (dots allowed, 253 characters). To ensure that
  44. // there are no conflicts with other CSI drivers on the cluster, the recommendation
  45. // is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends
  46. // with the unique CSI driver name.
  47. //
  48. // Objects are namespaced.
  49. //
  50. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  51. // +optional
  52. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  53. // NodeTopology defines which nodes have access to the storage
  54. // for which capacity was reported. If not set, the storage is
  55. // not accessible from any node in the cluster. If empty, the
  56. // storage is accessible from all nodes. This field is
  57. // immutable.
  58. //
  59. // +optional
  60. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector nodeTopology = 2;
  61. // The name of the StorageClass that the reported capacity applies to.
  62. // It must meet the same requirements as the name of a StorageClass
  63. // object (non-empty, DNS subdomain). If that object no longer exists,
  64. // the CSIStorageCapacity object is obsolete and should be removed by its
  65. // creator.
  66. // This field is immutable.
  67. optional string storageClassName = 3;
  68. // Capacity is the value reported by the CSI driver in its GetCapacityResponse
  69. // for a GetCapacityRequest with topology and parameters that match the
  70. // previous fields.
  71. //
  72. // The semantic is currently (CSI spec 1.2) defined as:
  73. // The available capacity, in bytes, of the storage that can be used
  74. // to provision volumes. If not set, that information is currently
  75. // unavailable and treated like zero capacity.
  76. //
  77. // +optional
  78. optional k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4;
  79. }
  80. // CSIStorageCapacityList is a collection of CSIStorageCapacity objects.
  81. message CSIStorageCapacityList {
  82. // Standard list metadata
  83. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  84. // +optional
  85. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  86. // Items is the list of CSIStorageCapacity objects.
  87. // +listType=map
  88. // +listMapKey=name
  89. repeated CSIStorageCapacity items = 2;
  90. }
  91. // VolumeAttachment captures the intent to attach or detach the specified volume
  92. // to/from the specified node.
  93. //
  94. // VolumeAttachment objects are non-namespaced.
  95. message VolumeAttachment {
  96. // Standard object metadata.
  97. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  98. // +optional
  99. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  100. // Specification of the desired attach/detach volume behavior.
  101. // Populated by the Kubernetes system.
  102. optional VolumeAttachmentSpec spec = 2;
  103. // Status of the VolumeAttachment request.
  104. // Populated by the entity completing the attach or detach
  105. // operation, i.e. the external-attacher.
  106. // +optional
  107. optional VolumeAttachmentStatus status = 3;
  108. }
  109. // VolumeAttachmentList is a collection of VolumeAttachment objects.
  110. message VolumeAttachmentList {
  111. // Standard list metadata
  112. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  113. // +optional
  114. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  115. // Items is the list of VolumeAttachments
  116. repeated VolumeAttachment items = 2;
  117. }
  118. // VolumeAttachmentSource represents a volume that should be attached.
  119. // Right now only PersistenVolumes can be attached via external attacher,
  120. // in future we may allow also inline volumes in pods.
  121. // Exactly one member can be set.
  122. message VolumeAttachmentSource {
  123. // Name of the persistent volume to attach.
  124. // +optional
  125. optional string persistentVolumeName = 1;
  126. // inlineVolumeSpec contains all the information necessary to attach
  127. // a persistent volume defined by a pod's inline VolumeSource. This field
  128. // is populated only for the CSIMigration feature. It contains
  129. // translated fields from a pod's inline VolumeSource to a
  130. // PersistentVolumeSpec. This field is alpha-level and is only
  131. // honored by servers that enabled the CSIMigration feature.
  132. // +optional
  133. optional k8s.io.api.core.v1.PersistentVolumeSpec inlineVolumeSpec = 2;
  134. }
  135. // VolumeAttachmentSpec is the specification of a VolumeAttachment request.
  136. message VolumeAttachmentSpec {
  137. // Attacher indicates the name of the volume driver that MUST handle this
  138. // request. This is the name returned by GetPluginName().
  139. optional string attacher = 1;
  140. // Source represents the volume that should be attached.
  141. optional VolumeAttachmentSource source = 2;
  142. // The node that the volume should be attached to.
  143. optional string nodeName = 3;
  144. }
  145. // VolumeAttachmentStatus is the status of a VolumeAttachment request.
  146. message VolumeAttachmentStatus {
  147. // Indicates the volume is successfully attached.
  148. // This field must only be set by the entity completing the attach
  149. // operation, i.e. the external-attacher.
  150. optional bool attached = 1;
  151. // Upon successful attach, this field is populated with any
  152. // information returned by the attach operation that must be passed
  153. // into subsequent WaitForAttach or Mount calls.
  154. // This field must only be set by the entity completing the attach
  155. // operation, i.e. the external-attacher.
  156. // +optional
  157. map<string, string> attachmentMetadata = 2;
  158. // The last error encountered during attach operation, if any.
  159. // This field must only be set by the entity completing the attach
  160. // operation, i.e. the external-attacher.
  161. // +optional
  162. optional VolumeError attachError = 3;
  163. // The last error encountered during detach operation, if any.
  164. // This field must only be set by the entity completing the detach
  165. // operation, i.e. the external-attacher.
  166. // +optional
  167. optional VolumeError detachError = 4;
  168. }
  169. // VolumeError captures an error encountered during a volume operation.
  170. message VolumeError {
  171. // Time the error was encountered.
  172. // +optional
  173. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
  174. // String detailing the error encountered during Attach or Detach operation.
  175. // This string maybe logged, so it should not contain sensitive
  176. // information.
  177. // +optional
  178. optional string message = 2;
  179. }