generated.proto 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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.v1beta1;
  16. import "k8s.io/api/core/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  19. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  20. // Package-wide variables from generator "generated".
  21. option go_package = "v1beta1";
  22. // CSIDriver captures information about a Container Storage Interface (CSI)
  23. // volume driver deployed on the cluster.
  24. // CSI drivers do not need to create the CSIDriver object directly. Instead they may use the
  25. // cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically
  26. // creates a CSIDriver object representing the driver.
  27. // Kubernetes attach detach controller uses this object to determine whether attach is required.
  28. // Kubelet uses this object to determine whether pod information needs to be passed on mount.
  29. // CSIDriver objects are non-namespaced.
  30. message CSIDriver {
  31. // Standard object metadata.
  32. // metadata.Name indicates the name of the CSI driver that this object
  33. // refers to; it MUST be the same name returned by the CSI GetPluginName()
  34. // call for that driver.
  35. // The driver name must be 63 characters or less, beginning and ending with
  36. // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and
  37. // alphanumerics between.
  38. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  39. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  40. // Specification of the CSI Driver.
  41. optional CSIDriverSpec spec = 2;
  42. }
  43. // CSIDriverList is a collection of CSIDriver objects.
  44. message CSIDriverList {
  45. // Standard list metadata
  46. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  47. // +optional
  48. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  49. // items is the list of CSIDriver
  50. repeated CSIDriver items = 2;
  51. }
  52. // CSIDriverSpec is the specification of a CSIDriver.
  53. message CSIDriverSpec {
  54. // attachRequired indicates this CSI volume driver requires an attach
  55. // operation (because it implements the CSI ControllerPublishVolume()
  56. // method), and that the Kubernetes attach detach controller should call
  57. // the attach volume interface which checks the volumeattachment status
  58. // and waits until the volume is attached before proceeding to mounting.
  59. // The CSI external-attacher coordinates with CSI volume driver and updates
  60. // the volumeattachment status when the attach operation is complete.
  61. // If the CSIDriverRegistry feature gate is enabled and the value is
  62. // specified to false, the attach operation will be skipped.
  63. // Otherwise the attach operation will be called.
  64. // +optional
  65. optional bool attachRequired = 1;
  66. // If set to true, podInfoOnMount indicates this CSI volume driver
  67. // requires additional pod information (like podName, podUID, etc.) during
  68. // mount operations.
  69. // If set to false, pod information will not be passed on mount.
  70. // Default is false.
  71. // The CSI driver specifies podInfoOnMount as part of driver deployment.
  72. // If true, Kubelet will pass pod information as VolumeContext in the CSI
  73. // NodePublishVolume() calls.
  74. // The CSI driver is responsible for parsing and validating the information
  75. // passed in as VolumeContext.
  76. // The following VolumeConext will be passed if podInfoOnMount is set to true.
  77. // This list might grow, but the prefix will be used.
  78. // "csi.storage.k8s.io/pod.name": pod.Name
  79. // "csi.storage.k8s.io/pod.namespace": pod.Namespace
  80. // "csi.storage.k8s.io/pod.uid": string(pod.UID)
  81. // +optional
  82. optional bool podInfoOnMount = 2;
  83. }
  84. // CSINode holds information about all CSI drivers installed on a node.
  85. // CSI drivers do not need to create the CSINode object directly. As long as
  86. // they use the node-driver-registrar sidecar container, the kubelet will
  87. // automatically populate the CSINode object for the CSI driver as part of
  88. // kubelet plugin registration.
  89. // CSINode has the same name as a node. If the object is missing, it means either
  90. // there are no CSI Drivers available on the node, or the Kubelet version is low
  91. // enough that it doesn't create this object.
  92. // CSINode has an OwnerReference that points to the corresponding node object.
  93. message CSINode {
  94. // metadata.name must be the Kubernetes node name.
  95. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  96. // spec is the specification of CSINode
  97. optional CSINodeSpec spec = 2;
  98. }
  99. // CSINodeDriver holds information about the specification of one CSI driver installed on a node
  100. message CSINodeDriver {
  101. // This is the name of the CSI driver that this object refers to.
  102. // This MUST be the same name returned by the CSI GetPluginName() call for
  103. // that driver.
  104. optional string name = 1;
  105. // nodeID of the node from the driver point of view.
  106. // This field enables Kubernetes to communicate with storage systems that do
  107. // not share the same nomenclature for nodes. For example, Kubernetes may
  108. // refer to a given node as "node1", but the storage system may refer to
  109. // the same node as "nodeA". When Kubernetes issues a command to the storage
  110. // system to attach a volume to a specific node, it can use this field to
  111. // refer to the node name using the ID that the storage system will
  112. // understand, e.g. "nodeA" instead of "node1". This field is required.
  113. optional string nodeID = 2;
  114. // topologyKeys is the list of keys supported by the driver.
  115. // When a driver is initialized on a cluster, it provides a set of topology
  116. // keys that it understands (e.g. "company.com/zone", "company.com/region").
  117. // When a driver is initialized on a node, it provides the same topology keys
  118. // along with values. Kubelet will expose these topology keys as labels
  119. // on its own node object.
  120. // When Kubernetes does topology aware provisioning, it can use this list to
  121. // determine which labels it should retrieve from the node object and pass
  122. // back to the driver.
  123. // It is possible for different nodes to use different topology keys.
  124. // This can be empty if driver does not support topology.
  125. // +optional
  126. repeated string topologyKeys = 3;
  127. }
  128. // CSINodeList is a collection of CSINode objects.
  129. message CSINodeList {
  130. // Standard list metadata
  131. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  132. // +optional
  133. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  134. // items is the list of CSINode
  135. repeated CSINode items = 2;
  136. }
  137. // CSINodeSpec holds information about the specification of all CSI drivers installed on a node
  138. message CSINodeSpec {
  139. // drivers is a list of information of all CSI Drivers existing on a node.
  140. // If all drivers in the list are uninstalled, this can become empty.
  141. // +patchMergeKey=name
  142. // +patchStrategy=merge
  143. repeated CSINodeDriver drivers = 1;
  144. }
  145. // StorageClass describes the parameters for a class of storage for
  146. // which PersistentVolumes can be dynamically provisioned.
  147. //
  148. // StorageClasses are non-namespaced; the name of the storage class
  149. // according to etcd is in ObjectMeta.Name.
  150. message StorageClass {
  151. // Standard object's metadata.
  152. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  153. // +optional
  154. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  155. // Provisioner indicates the type of the provisioner.
  156. optional string provisioner = 2;
  157. // Parameters holds the parameters for the provisioner that should
  158. // create volumes of this storage class.
  159. // +optional
  160. map<string, string> parameters = 3;
  161. // Dynamically provisioned PersistentVolumes of this storage class are
  162. // created with this reclaimPolicy. Defaults to Delete.
  163. // +optional
  164. optional string reclaimPolicy = 4;
  165. // Dynamically provisioned PersistentVolumes of this storage class are
  166. // created with these mountOptions, e.g. ["ro", "soft"]. Not validated -
  167. // mount of the PVs will simply fail if one is invalid.
  168. // +optional
  169. repeated string mountOptions = 5;
  170. // AllowVolumeExpansion shows whether the storage class allow volume expand
  171. // +optional
  172. optional bool allowVolumeExpansion = 6;
  173. // VolumeBindingMode indicates how PersistentVolumeClaims should be
  174. // provisioned and bound. When unset, VolumeBindingImmediate is used.
  175. // This field is only honored by servers that enable the VolumeScheduling feature.
  176. // +optional
  177. optional string volumeBindingMode = 7;
  178. // Restrict the node topologies where volumes can be dynamically provisioned.
  179. // Each volume plugin defines its own supported topology specifications.
  180. // An empty TopologySelectorTerm list means there is no topology restriction.
  181. // This field is only honored by servers that enable the VolumeScheduling feature.
  182. // +optional
  183. repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8;
  184. }
  185. // StorageClassList is a collection of storage classes.
  186. message StorageClassList {
  187. // Standard list metadata
  188. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  189. // +optional
  190. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  191. // Items is the list of StorageClasses
  192. repeated StorageClass items = 2;
  193. }
  194. // VolumeAttachment captures the intent to attach or detach the specified volume
  195. // to/from the specified node.
  196. //
  197. // VolumeAttachment objects are non-namespaced.
  198. message VolumeAttachment {
  199. // Standard object metadata.
  200. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  201. // +optional
  202. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  203. // Specification of the desired attach/detach volume behavior.
  204. // Populated by the Kubernetes system.
  205. optional VolumeAttachmentSpec spec = 2;
  206. // Status of the VolumeAttachment request.
  207. // Populated by the entity completing the attach or detach
  208. // operation, i.e. the external-attacher.
  209. // +optional
  210. optional VolumeAttachmentStatus status = 3;
  211. }
  212. // VolumeAttachmentList is a collection of VolumeAttachment objects.
  213. message VolumeAttachmentList {
  214. // Standard list metadata
  215. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
  216. // +optional
  217. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  218. // Items is the list of VolumeAttachments
  219. repeated VolumeAttachment items = 2;
  220. }
  221. // VolumeAttachmentSource represents a volume that should be attached.
  222. // Right now only PersistenVolumes can be attached via external attacher,
  223. // in future we may allow also inline volumes in pods.
  224. // Exactly one member can be set.
  225. message VolumeAttachmentSource {
  226. // Name of the persistent volume to attach.
  227. // +optional
  228. optional string persistentVolumeName = 1;
  229. }
  230. // VolumeAttachmentSpec is the specification of a VolumeAttachment request.
  231. message VolumeAttachmentSpec {
  232. // Attacher indicates the name of the volume driver that MUST handle this
  233. // request. This is the name returned by GetPluginName().
  234. optional string attacher = 1;
  235. // Source represents the volume that should be attached.
  236. optional VolumeAttachmentSource source = 2;
  237. // The node that the volume should be attached to.
  238. optional string nodeName = 3;
  239. }
  240. // VolumeAttachmentStatus is the status of a VolumeAttachment request.
  241. message VolumeAttachmentStatus {
  242. // Indicates the volume is successfully attached.
  243. // This field must only be set by the entity completing the attach
  244. // operation, i.e. the external-attacher.
  245. optional bool attached = 1;
  246. // Upon successful attach, this field is populated with any
  247. // information returned by the attach operation that must be passed
  248. // into subsequent WaitForAttach or Mount calls.
  249. // This field must only be set by the entity completing the attach
  250. // operation, i.e. the external-attacher.
  251. // +optional
  252. map<string, string> attachmentMetadata = 2;
  253. // The last error encountered during attach operation, if any.
  254. // This field must only be set by the entity completing the attach
  255. // operation, i.e. the external-attacher.
  256. // +optional
  257. optional VolumeError attachError = 3;
  258. // The last error encountered during detach operation, if any.
  259. // This field must only be set by the entity completing the detach
  260. // operation, i.e. the external-attacher.
  261. // +optional
  262. optional VolumeError detachError = 4;
  263. }
  264. // VolumeError captures an error encountered during a volume operation.
  265. message VolumeError {
  266. // Time the error was encountered.
  267. // +optional
  268. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
  269. // String detailing the error encountered during Attach or Detach operation.
  270. // This string may be logged, so it should not contain sensitive
  271. // information.
  272. // +optional
  273. optional string message = 2;
  274. }