Scott Baker | e7144bc | 2019-10-01 14:16:47 -0700 | [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.v1; |
| 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 = "v1"; |
| 31 | |
| 32 | // StorageClass describes the parameters for a class of storage for |
| 33 | // which PersistentVolumes can be dynamically provisioned. |
| 34 | // |
| 35 | // StorageClasses are non-namespaced; the name of the storage class |
| 36 | // according to etcd is in ObjectMeta.Name. |
| 37 | message StorageClass { |
| 38 | // Standard object's metadata. |
| 39 | // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata |
| 40 | // +optional |
| 41 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; |
| 42 | |
| 43 | // Provisioner indicates the type of the provisioner. |
| 44 | optional string provisioner = 2; |
| 45 | |
| 46 | // Parameters holds the parameters for the provisioner that should |
| 47 | // create volumes of this storage class. |
| 48 | // +optional |
| 49 | map<string, string> parameters = 3; |
| 50 | |
| 51 | // Dynamically provisioned PersistentVolumes of this storage class are |
| 52 | // created with this reclaimPolicy. Defaults to Delete. |
| 53 | // +optional |
| 54 | optional string reclaimPolicy = 4; |
| 55 | |
| 56 | // Dynamically provisioned PersistentVolumes of this storage class are |
| 57 | // created with these mountOptions, e.g. ["ro", "soft"]. Not validated - |
| 58 | // mount of the PVs will simply fail if one is invalid. |
| 59 | // +optional |
| 60 | repeated string mountOptions = 5; |
| 61 | |
| 62 | // AllowVolumeExpansion shows whether the storage class allow volume expand |
| 63 | // +optional |
| 64 | optional bool allowVolumeExpansion = 6; |
| 65 | |
| 66 | // VolumeBindingMode indicates how PersistentVolumeClaims should be |
| 67 | // provisioned and bound. When unset, VolumeBindingImmediate is used. |
| 68 | // This field is only honored by servers that enable the VolumeScheduling feature. |
| 69 | // +optional |
| 70 | optional string volumeBindingMode = 7; |
| 71 | |
| 72 | // Restrict the node topologies where volumes can be dynamically provisioned. |
| 73 | // Each volume plugin defines its own supported topology specifications. |
| 74 | // An empty TopologySelectorTerm list means there is no topology restriction. |
| 75 | // This field is only honored by servers that enable the VolumeScheduling feature. |
| 76 | // +optional |
| 77 | repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8; |
| 78 | } |
| 79 | |
| 80 | // StorageClassList is a collection of storage classes. |
| 81 | message StorageClassList { |
| 82 | // Standard list metadata |
| 83 | // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata |
| 84 | // +optional |
| 85 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; |
| 86 | |
| 87 | // Items is the list of StorageClasses |
| 88 | repeated StorageClass items = 2; |
| 89 | } |
| 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/api-conventions.md#metadata |
| 98 | // +optional |
| 99 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; |
| 100 | |
| 101 | // Specification of the desired attach/detach volume behavior. |
| 102 | // Populated by the Kubernetes system. |
| 103 | optional VolumeAttachmentSpec spec = 2; |
| 104 | |
| 105 | // Status of the VolumeAttachment request. |
| 106 | // Populated by the entity completing the attach or detach |
| 107 | // operation, i.e. the external-attacher. |
| 108 | // +optional |
| 109 | optional VolumeAttachmentStatus status = 3; |
| 110 | } |
| 111 | |
| 112 | // VolumeAttachmentList is a collection of VolumeAttachment objects. |
| 113 | message VolumeAttachmentList { |
| 114 | // Standard list metadata |
| 115 | // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata |
| 116 | // +optional |
| 117 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; |
| 118 | |
| 119 | // Items is the list of VolumeAttachments |
| 120 | repeated VolumeAttachment items = 2; |
| 121 | } |
| 122 | |
| 123 | // VolumeAttachmentSource represents a volume that should be attached. |
| 124 | // Right now only PersistenVolumes can be attached via external attacher, |
| 125 | // in future we may allow also inline volumes in pods. |
| 126 | // Exactly one member can be set. |
| 127 | message VolumeAttachmentSource { |
| 128 | // Name of the persistent volume to attach. |
| 129 | // +optional |
| 130 | optional string persistentVolumeName = 1; |
girishk | e7ca43b | 2019-10-10 12:30:03 +0000 | [diff] [blame^] | 131 | |
| 132 | // inlineVolumeSpec contains all the information necessary to attach |
| 133 | // a persistent volume defined by a pod's inline VolumeSource. This field |
| 134 | // is populated only for the CSIMigration feature. It contains |
| 135 | // translated fields from a pod's inline VolumeSource to a |
| 136 | // PersistentVolumeSpec. This field is alpha-level and is only |
| 137 | // honored by servers that enabled the CSIMigration feature. |
| 138 | // +optional |
| 139 | optional k8s.io.api.core.v1.PersistentVolumeSpec inlineVolumeSpec = 2; |
Scott Baker | e7144bc | 2019-10-01 14:16:47 -0700 | [diff] [blame] | 140 | } |
| 141 | |
| 142 | // VolumeAttachmentSpec is the specification of a VolumeAttachment request. |
| 143 | message VolumeAttachmentSpec { |
| 144 | // Attacher indicates the name of the volume driver that MUST handle this |
| 145 | // request. This is the name returned by GetPluginName(). |
| 146 | optional string attacher = 1; |
| 147 | |
| 148 | // Source represents the volume that should be attached. |
| 149 | optional VolumeAttachmentSource source = 2; |
| 150 | |
| 151 | // The node that the volume should be attached to. |
| 152 | optional string nodeName = 3; |
| 153 | } |
| 154 | |
| 155 | // VolumeAttachmentStatus is the status of a VolumeAttachment request. |
| 156 | message VolumeAttachmentStatus { |
| 157 | // Indicates the volume is successfully attached. |
| 158 | // This field must only be set by the entity completing the attach |
| 159 | // operation, i.e. the external-attacher. |
| 160 | optional bool attached = 1; |
| 161 | |
| 162 | // Upon successful attach, this field is populated with any |
| 163 | // information returned by the attach operation that must be passed |
| 164 | // into subsequent WaitForAttach or Mount calls. |
| 165 | // This field must only be set by the entity completing the attach |
| 166 | // operation, i.e. the external-attacher. |
| 167 | // +optional |
| 168 | map<string, string> attachmentMetadata = 2; |
| 169 | |
| 170 | // The last error encountered during attach operation, if any. |
| 171 | // This field must only be set by the entity completing the attach |
| 172 | // operation, i.e. the external-attacher. |
| 173 | // +optional |
| 174 | optional VolumeError attachError = 3; |
| 175 | |
| 176 | // The last error encountered during detach operation, if any. |
| 177 | // This field must only be set by the entity completing the detach |
| 178 | // operation, i.e. the external-attacher. |
| 179 | // +optional |
| 180 | optional VolumeError detachError = 4; |
| 181 | } |
| 182 | |
| 183 | // VolumeError captures an error encountered during a volume operation. |
| 184 | message VolumeError { |
| 185 | // Time the error was encountered. |
| 186 | // +optional |
| 187 | optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1; |
| 188 | |
| 189 | // String detailing the error encountered during Attach or Detach operation. |
girishk | e7ca43b | 2019-10-10 12:30:03 +0000 | [diff] [blame^] | 190 | // This string may be logged, so it should not contain sensitive |
Scott Baker | e7144bc | 2019-10-01 14:16:47 -0700 | [diff] [blame] | 191 | // information. |
| 192 | // +optional |
| 193 | optional string message = 2; |
| 194 | } |
| 195 | |