Matteo Scandolo | a428586 | 2020-12-01 18:10:10 -0800 | [diff] [blame^] | 1 | /* |
| 2 | Copyright The Kubernetes Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | |
| 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! |
| 19 | |
| 20 | syntax = 'proto2'; |
| 21 | |
| 22 | package k8s.io.api.storage.v1beta1; |
| 23 | |
| 24 | import "k8s.io/api/core/v1/generated.proto"; |
| 25 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; |
| 26 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; |
| 27 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; |
| 28 | |
| 29 | // Package-wide variables from generator "generated". |
| 30 | option go_package = "v1beta1"; |
| 31 | |
| 32 | // CSIDriver captures information about a Container Storage Interface (CSI) |
| 33 | // volume driver deployed on the cluster. |
| 34 | // CSI drivers do not need to create the CSIDriver object directly. Instead they may use the |
| 35 | // cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically |
| 36 | // creates a CSIDriver object representing the driver. |
| 37 | // Kubernetes attach detach controller uses this object to determine whether attach is required. |
| 38 | // Kubelet uses this object to determine whether pod information needs to be passed on mount. |
| 39 | // CSIDriver objects are non-namespaced. |
| 40 | message CSIDriver { |
| 41 | // Standard object metadata. |
| 42 | // metadata.Name indicates the name of the CSI driver that this object |
| 43 | // refers to; it MUST be the same name returned by the CSI GetPluginName() |
| 44 | // call for that driver. |
| 45 | // The driver name must be 63 characters or less, beginning and ending with |
| 46 | // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and |
| 47 | // alphanumerics between. |
| 48 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 49 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; |
| 50 | |
| 51 | // Specification of the CSI Driver. |
| 52 | optional CSIDriverSpec spec = 2; |
| 53 | } |
| 54 | |
| 55 | // CSIDriverList is a collection of CSIDriver objects. |
| 56 | message CSIDriverList { |
| 57 | // Standard list metadata |
| 58 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 59 | // +optional |
| 60 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; |
| 61 | |
| 62 | // items is the list of CSIDriver |
| 63 | repeated CSIDriver items = 2; |
| 64 | } |
| 65 | |
| 66 | // CSIDriverSpec is the specification of a CSIDriver. |
| 67 | message CSIDriverSpec { |
| 68 | // attachRequired indicates this CSI volume driver requires an attach |
| 69 | // operation (because it implements the CSI ControllerPublishVolume() |
| 70 | // method), and that the Kubernetes attach detach controller should call |
| 71 | // the attach volume interface which checks the volumeattachment status |
| 72 | // and waits until the volume is attached before proceeding to mounting. |
| 73 | // The CSI external-attacher coordinates with CSI volume driver and updates |
| 74 | // the volumeattachment status when the attach operation is complete. |
| 75 | // If the CSIDriverRegistry feature gate is enabled and the value is |
| 76 | // specified to false, the attach operation will be skipped. |
| 77 | // Otherwise the attach operation will be called. |
| 78 | // +optional |
| 79 | optional bool attachRequired = 1; |
| 80 | |
| 81 | // If set to true, podInfoOnMount indicates this CSI volume driver |
| 82 | // requires additional pod information (like podName, podUID, etc.) during |
| 83 | // mount operations. |
| 84 | // If set to false, pod information will not be passed on mount. |
| 85 | // Default is false. |
| 86 | // The CSI driver specifies podInfoOnMount as part of driver deployment. |
| 87 | // If true, Kubelet will pass pod information as VolumeContext in the CSI |
| 88 | // NodePublishVolume() calls. |
| 89 | // The CSI driver is responsible for parsing and validating the information |
| 90 | // passed in as VolumeContext. |
| 91 | // The following VolumeConext will be passed if podInfoOnMount is set to true. |
| 92 | // This list might grow, but the prefix will be used. |
| 93 | // "csi.storage.k8s.io/pod.name": pod.Name |
| 94 | // "csi.storage.k8s.io/pod.namespace": pod.Namespace |
| 95 | // "csi.storage.k8s.io/pod.uid": string(pod.UID) |
| 96 | // "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume |
| 97 | // defined by a CSIVolumeSource, otherwise "false" |
| 98 | // |
| 99 | // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only |
| 100 | // required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. |
| 101 | // Other drivers can leave pod info disabled and/or ignore this field. |
| 102 | // As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when |
| 103 | // deployed on such a cluster and the deployment determines which mode that is, for example |
| 104 | // via a command line parameter of the driver. |
| 105 | // +optional |
| 106 | optional bool podInfoOnMount = 2; |
| 107 | |
| 108 | // VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. |
| 109 | // The default if the list is empty is "Persistent", which is the usage |
| 110 | // defined by the CSI specification and implemented in Kubernetes via the usual |
| 111 | // PV/PVC mechanism. |
| 112 | // The other mode is "Ephemeral". In this mode, volumes are defined inline |
| 113 | // inside the pod spec with CSIVolumeSource and their lifecycle is tied to |
| 114 | // the lifecycle of that pod. A driver has to be aware of this |
| 115 | // because it is only going to get a NodePublishVolume call for such a volume. |
| 116 | // For more information about implementing this mode, see |
| 117 | // https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html |
| 118 | // A driver can support one or more of these modes and |
| 119 | // more modes may be added in the future. |
| 120 | // +optional |
| 121 | repeated string volumeLifecycleModes = 3; |
| 122 | |
| 123 | // If set to true, storageCapacity indicates that the CSI |
| 124 | // volume driver wants pod scheduling to consider the storage |
| 125 | // capacity that the driver deployment will report by creating |
| 126 | // CSIStorageCapacity objects with capacity information. |
| 127 | // |
| 128 | // The check can be enabled immediately when deploying a driver. |
| 129 | // In that case, provisioning new volumes with late binding |
| 130 | // will pause until the driver deployment has published |
| 131 | // some suitable CSIStorageCapacity object. |
| 132 | // |
| 133 | // Alternatively, the driver can be deployed with the field |
| 134 | // unset or false and it can be flipped later when storage |
| 135 | // capacity information has been published. |
| 136 | // |
| 137 | // This is an alpha field and only available when the CSIStorageCapacity |
| 138 | // feature is enabled. The default is false. |
| 139 | // |
| 140 | // +optional |
| 141 | optional bool storageCapacity = 4; |
| 142 | |
| 143 | // Defines if the underlying volume supports changing ownership and |
| 144 | // permission of the volume before being mounted. |
| 145 | // Refer to the specific FSGroupPolicy values for additional details. |
| 146 | // This field is alpha-level, and is only honored by servers |
| 147 | // that enable the CSIVolumeFSGroupPolicy feature gate. |
| 148 | // +optional |
| 149 | optional string fsGroupPolicy = 5; |
| 150 | } |
| 151 | |
| 152 | // DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. |
| 153 | // See the release notes for more information. |
| 154 | // CSINode holds information about all CSI drivers installed on a node. |
| 155 | // CSI drivers do not need to create the CSINode object directly. As long as |
| 156 | // they use the node-driver-registrar sidecar container, the kubelet will |
| 157 | // automatically populate the CSINode object for the CSI driver as part of |
| 158 | // kubelet plugin registration. |
| 159 | // CSINode has the same name as a node. If the object is missing, it means either |
| 160 | // there are no CSI Drivers available on the node, or the Kubelet version is low |
| 161 | // enough that it doesn't create this object. |
| 162 | // CSINode has an OwnerReference that points to the corresponding node object. |
| 163 | message CSINode { |
| 164 | // metadata.name must be the Kubernetes node name. |
| 165 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; |
| 166 | |
| 167 | // spec is the specification of CSINode |
| 168 | optional CSINodeSpec spec = 2; |
| 169 | } |
| 170 | |
| 171 | // CSINodeDriver holds information about the specification of one CSI driver installed on a node |
| 172 | message CSINodeDriver { |
| 173 | // This is the name of the CSI driver that this object refers to. |
| 174 | // This MUST be the same name returned by the CSI GetPluginName() call for |
| 175 | // that driver. |
| 176 | optional string name = 1; |
| 177 | |
| 178 | // nodeID of the node from the driver point of view. |
| 179 | // This field enables Kubernetes to communicate with storage systems that do |
| 180 | // not share the same nomenclature for nodes. For example, Kubernetes may |
| 181 | // refer to a given node as "node1", but the storage system may refer to |
| 182 | // the same node as "nodeA". When Kubernetes issues a command to the storage |
| 183 | // system to attach a volume to a specific node, it can use this field to |
| 184 | // refer to the node name using the ID that the storage system will |
| 185 | // understand, e.g. "nodeA" instead of "node1". This field is required. |
| 186 | optional string nodeID = 2; |
| 187 | |
| 188 | // topologyKeys is the list of keys supported by the driver. |
| 189 | // When a driver is initialized on a cluster, it provides a set of topology |
| 190 | // keys that it understands (e.g. "company.com/zone", "company.com/region"). |
| 191 | // When a driver is initialized on a node, it provides the same topology keys |
| 192 | // along with values. Kubelet will expose these topology keys as labels |
| 193 | // on its own node object. |
| 194 | // When Kubernetes does topology aware provisioning, it can use this list to |
| 195 | // determine which labels it should retrieve from the node object and pass |
| 196 | // back to the driver. |
| 197 | // It is possible for different nodes to use different topology keys. |
| 198 | // This can be empty if driver does not support topology. |
| 199 | // +optional |
| 200 | repeated string topologyKeys = 3; |
| 201 | |
| 202 | // allocatable represents the volume resources of a node that are available for scheduling. |
| 203 | // +optional |
| 204 | optional VolumeNodeResources allocatable = 4; |
| 205 | } |
| 206 | |
| 207 | // CSINodeList is a collection of CSINode objects. |
| 208 | message CSINodeList { |
| 209 | // Standard list metadata |
| 210 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 211 | // +optional |
| 212 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; |
| 213 | |
| 214 | // items is the list of CSINode |
| 215 | repeated CSINode items = 2; |
| 216 | } |
| 217 | |
| 218 | // CSINodeSpec holds information about the specification of all CSI drivers installed on a node |
| 219 | message CSINodeSpec { |
| 220 | // drivers is a list of information of all CSI Drivers existing on a node. |
| 221 | // If all drivers in the list are uninstalled, this can become empty. |
| 222 | // +patchMergeKey=name |
| 223 | // +patchStrategy=merge |
| 224 | repeated CSINodeDriver drivers = 1; |
| 225 | } |
| 226 | |
| 227 | // StorageClass describes the parameters for a class of storage for |
| 228 | // which PersistentVolumes can be dynamically provisioned. |
| 229 | // |
| 230 | // StorageClasses are non-namespaced; the name of the storage class |
| 231 | // according to etcd is in ObjectMeta.Name. |
| 232 | message StorageClass { |
| 233 | // Standard object's metadata. |
| 234 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 235 | // +optional |
| 236 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; |
| 237 | |
| 238 | // Provisioner indicates the type of the provisioner. |
| 239 | optional string provisioner = 2; |
| 240 | |
| 241 | // Parameters holds the parameters for the provisioner that should |
| 242 | // create volumes of this storage class. |
| 243 | // +optional |
| 244 | map<string, string> parameters = 3; |
| 245 | |
| 246 | // Dynamically provisioned PersistentVolumes of this storage class are |
| 247 | // created with this reclaimPolicy. Defaults to Delete. |
| 248 | // +optional |
| 249 | optional string reclaimPolicy = 4; |
| 250 | |
| 251 | // Dynamically provisioned PersistentVolumes of this storage class are |
| 252 | // created with these mountOptions, e.g. ["ro", "soft"]. Not validated - |
| 253 | // mount of the PVs will simply fail if one is invalid. |
| 254 | // +optional |
| 255 | repeated string mountOptions = 5; |
| 256 | |
| 257 | // AllowVolumeExpansion shows whether the storage class allow volume expand |
| 258 | // +optional |
| 259 | optional bool allowVolumeExpansion = 6; |
| 260 | |
| 261 | // VolumeBindingMode indicates how PersistentVolumeClaims should be |
| 262 | // provisioned and bound. When unset, VolumeBindingImmediate is used. |
| 263 | // This field is only honored by servers that enable the VolumeScheduling feature. |
| 264 | // +optional |
| 265 | optional string volumeBindingMode = 7; |
| 266 | |
| 267 | // Restrict the node topologies where volumes can be dynamically provisioned. |
| 268 | // Each volume plugin defines its own supported topology specifications. |
| 269 | // An empty TopologySelectorTerm list means there is no topology restriction. |
| 270 | // This field is only honored by servers that enable the VolumeScheduling feature. |
| 271 | // +optional |
| 272 | repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8; |
| 273 | } |
| 274 | |
| 275 | // StorageClassList is a collection of storage classes. |
| 276 | message StorageClassList { |
| 277 | // Standard list metadata |
| 278 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 279 | // +optional |
| 280 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; |
| 281 | |
| 282 | // Items is the list of StorageClasses |
| 283 | repeated StorageClass items = 2; |
| 284 | } |
| 285 | |
| 286 | // VolumeAttachment captures the intent to attach or detach the specified volume |
| 287 | // to/from the specified node. |
| 288 | // |
| 289 | // VolumeAttachment objects are non-namespaced. |
| 290 | message VolumeAttachment { |
| 291 | // Standard object metadata. |
| 292 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 293 | // +optional |
| 294 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; |
| 295 | |
| 296 | // Specification of the desired attach/detach volume behavior. |
| 297 | // Populated by the Kubernetes system. |
| 298 | optional VolumeAttachmentSpec spec = 2; |
| 299 | |
| 300 | // Status of the VolumeAttachment request. |
| 301 | // Populated by the entity completing the attach or detach |
| 302 | // operation, i.e. the external-attacher. |
| 303 | // +optional |
| 304 | optional VolumeAttachmentStatus status = 3; |
| 305 | } |
| 306 | |
| 307 | // VolumeAttachmentList is a collection of VolumeAttachment objects. |
| 308 | message VolumeAttachmentList { |
| 309 | // Standard list metadata |
| 310 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 311 | // +optional |
| 312 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; |
| 313 | |
| 314 | // Items is the list of VolumeAttachments |
| 315 | repeated VolumeAttachment items = 2; |
| 316 | } |
| 317 | |
| 318 | // VolumeAttachmentSource represents a volume that should be attached. |
| 319 | // Right now only PersistenVolumes can be attached via external attacher, |
| 320 | // in future we may allow also inline volumes in pods. |
| 321 | // Exactly one member can be set. |
| 322 | message VolumeAttachmentSource { |
| 323 | // Name of the persistent volume to attach. |
| 324 | // +optional |
| 325 | optional string persistentVolumeName = 1; |
| 326 | |
| 327 | // inlineVolumeSpec contains all the information necessary to attach |
| 328 | // a persistent volume defined by a pod's inline VolumeSource. This field |
| 329 | // is populated only for the CSIMigration feature. It contains |
| 330 | // translated fields from a pod's inline VolumeSource to a |
| 331 | // PersistentVolumeSpec. This field is alpha-level and is only |
| 332 | // honored by servers that enabled the CSIMigration feature. |
| 333 | // +optional |
| 334 | optional k8s.io.api.core.v1.PersistentVolumeSpec inlineVolumeSpec = 2; |
| 335 | } |
| 336 | |
| 337 | // VolumeAttachmentSpec is the specification of a VolumeAttachment request. |
| 338 | message VolumeAttachmentSpec { |
| 339 | // Attacher indicates the name of the volume driver that MUST handle this |
| 340 | // request. This is the name returned by GetPluginName(). |
| 341 | optional string attacher = 1; |
| 342 | |
| 343 | // Source represents the volume that should be attached. |
| 344 | optional VolumeAttachmentSource source = 2; |
| 345 | |
| 346 | // The node that the volume should be attached to. |
| 347 | optional string nodeName = 3; |
| 348 | } |
| 349 | |
| 350 | // VolumeAttachmentStatus is the status of a VolumeAttachment request. |
| 351 | message VolumeAttachmentStatus { |
| 352 | // Indicates the volume is successfully attached. |
| 353 | // This field must only be set by the entity completing the attach |
| 354 | // operation, i.e. the external-attacher. |
| 355 | optional bool attached = 1; |
| 356 | |
| 357 | // Upon successful attach, this field is populated with any |
| 358 | // information returned by the attach operation that must be passed |
| 359 | // into subsequent WaitForAttach or Mount calls. |
| 360 | // This field must only be set by the entity completing the attach |
| 361 | // operation, i.e. the external-attacher. |
| 362 | // +optional |
| 363 | map<string, string> attachmentMetadata = 2; |
| 364 | |
| 365 | // The last error encountered during attach operation, if any. |
| 366 | // This field must only be set by the entity completing the attach |
| 367 | // operation, i.e. the external-attacher. |
| 368 | // +optional |
| 369 | optional VolumeError attachError = 3; |
| 370 | |
| 371 | // The last error encountered during detach operation, if any. |
| 372 | // This field must only be set by the entity completing the detach |
| 373 | // operation, i.e. the external-attacher. |
| 374 | // +optional |
| 375 | optional VolumeError detachError = 4; |
| 376 | } |
| 377 | |
| 378 | // VolumeError captures an error encountered during a volume operation. |
| 379 | message VolumeError { |
| 380 | // Time the error was encountered. |
| 381 | // +optional |
| 382 | optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1; |
| 383 | |
| 384 | // String detailing the error encountered during Attach or Detach operation. |
| 385 | // This string may be logged, so it should not contain sensitive |
| 386 | // information. |
| 387 | // +optional |
| 388 | optional string message = 2; |
| 389 | } |
| 390 | |
| 391 | // VolumeNodeResources is a set of resource limits for scheduling of volumes. |
| 392 | message VolumeNodeResources { |
| 393 | // Maximum number of unique volumes managed by the CSI driver that can be used on a node. |
| 394 | // A volume that is both attached and mounted on a node is considered to be used once, not twice. |
| 395 | // The same rule applies for a unique volume that is shared among multiple pods on the same node. |
| 396 | // If this field is nil, then the supported number of volumes on this node is unbounded. |
| 397 | // +optional |
| 398 | optional int32 count = 1; |
| 399 | } |
| 400 | |