blob: df7823593e3c17e886f7bcbb0398b8d8e4b3415d [file] [log] [blame]
Zack Williamse940c7a2019-08-21 14:25:39 -07001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = 'proto2';
21
22package k8s.io.api.storage.v1;
23
24import "k8s.io/api/core/v1/generated.proto";
25import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
26import "k8s.io/apimachinery/pkg/runtime/generated.proto";
27import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
28
29// Package-wide variables from generator "generated".
30option 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.
37message 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.
81message 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.
95message 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.
113message 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.
127message VolumeAttachmentSource {
128 // Name of the persistent volume to attach.
129 // +optional
130 optional string persistentVolumeName = 1;
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;
140}
141
142// VolumeAttachmentSpec is the specification of a VolumeAttachment request.
143message 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.
156message 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.
184message 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.
190 // This string may be logged, so it should not contain sensitive
191 // information.
192 // +optional
193 optional string message = 2;
194}
195