blob: 2f792a06c5b265421b789b633f2541bd7ff1495b [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
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.v1alpha1;
23
24import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/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";
28import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
29
30// Package-wide variables from generator "generated".
31option go_package = "v1alpha1";
32
33// VolumeAttachment captures the intent to attach or detach the specified volume
34// to/from the specified node.
35//
36// VolumeAttachment objects are non-namespaced.
37message VolumeAttachment {
38 // Standard object 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 // Specification of the desired attach/detach volume behavior.
44 // Populated by the Kubernetes system.
45 optional VolumeAttachmentSpec spec = 2;
46
47 // Status of the VolumeAttachment request.
48 // Populated by the entity completing the attach or detach
49 // operation, i.e. the external-attacher.
50 // +optional
51 optional VolumeAttachmentStatus status = 3;
52}
53
54// VolumeAttachmentList is a collection of VolumeAttachment objects.
55message VolumeAttachmentList {
56 // Standard list metadata
57 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
58 // +optional
59 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
60
61 // Items is the list of VolumeAttachments
62 repeated VolumeAttachment items = 2;
63}
64
65// VolumeAttachmentSource represents a volume that should be attached.
66// Right now only PersistenVolumes can be attached via external attacher,
67// in future we may allow also inline volumes in pods.
68// Exactly one member can be set.
69message VolumeAttachmentSource {
70 // Name of the persistent volume to attach.
71 // +optional
72 optional string persistentVolumeName = 1;
73}
74
75// VolumeAttachmentSpec is the specification of a VolumeAttachment request.
76message VolumeAttachmentSpec {
77 // Attacher indicates the name of the volume driver that MUST handle this
78 // request. This is the name returned by GetPluginName().
79 optional string attacher = 1;
80
81 // Source represents the volume that should be attached.
82 optional VolumeAttachmentSource source = 2;
83
84 // The node that the volume should be attached to.
85 optional string nodeName = 3;
86}
87
88// VolumeAttachmentStatus is the status of a VolumeAttachment request.
89message VolumeAttachmentStatus {
90 // Indicates the volume is successfully attached.
91 // This field must only be set by the entity completing the attach
92 // operation, i.e. the external-attacher.
93 optional bool attached = 1;
94
95 // Upon successful attach, this field is populated with any
96 // information returned by the attach operation that must be passed
97 // into subsequent WaitForAttach or Mount calls.
98 // This field must only be set by the entity completing the attach
99 // operation, i.e. the external-attacher.
100 // +optional
101 map<string, string> attachmentMetadata = 2;
102
103 // The last error encountered during attach operation, if any.
104 // This field must only be set by the entity completing the attach
105 // operation, i.e. the external-attacher.
106 // +optional
107 optional VolumeError attachError = 3;
108
109 // The last error encountered during detach operation, if any.
110 // This field must only be set by the entity completing the detach
111 // operation, i.e. the external-attacher.
112 // +optional
113 optional VolumeError detachError = 4;
114}
115
116// VolumeError captures an error encountered during a volume operation.
117message VolumeError {
118 // Time the error was encountered.
119 // +optional
120 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
121
122 // String detailing the error encountered during Attach or Detach operation.
123 // This string maybe logged, so it should not contain sensitive
124 // information.
125 // +optional
126 optional string message = 2;
127}
128