1/* 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/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 = "v1alpha1"; 31 32// VolumeAttachment captures the intent to attach or detach the specified volume 33// to/from the specified node. 34// 35// VolumeAttachment objects are non-namespaced. 36message VolumeAttachment { 37 // Standard object metadata. 38 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 39 // +optional 40 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 41 42 // Specification of the desired attach/detach volume behavior. 43 // Populated by the Kubernetes system. 44 optional VolumeAttachmentSpec spec = 2; 45 46 // Status of the VolumeAttachment request. 47 // Populated by the entity completing the attach or detach 48 // operation, i.e. the external-attacher. 49 // +optional 50 optional VolumeAttachmentStatus status = 3; 51} 52 53// VolumeAttachmentList is a collection of VolumeAttachment objects. 54message VolumeAttachmentList { 55 // Standard list metadata 56 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 57 // +optional 58 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 59 60 // Items is the list of VolumeAttachments 61 repeated VolumeAttachment items = 2; 62} 63 64// VolumeAttachmentSource represents a volume that should be attached. 65// Right now only PersistenVolumes can be attached via external attacher, 66// in future we may allow also inline volumes in pods. 67// Exactly one member can be set. 68message VolumeAttachmentSource { 69 // Name of the persistent volume to attach. 70 // +optional 71 optional string persistentVolumeName = 1; 72 73 // inlineVolumeSpec contains all the information necessary to attach 74 // a persistent volume defined by a pod's inline VolumeSource. This field 75 // is populated only for the CSIMigration feature. It contains 76 // translated fields from a pod's inline VolumeSource to a 77 // PersistentVolumeSpec. This field is alpha-level and is only 78 // honored by servers that enabled the CSIMigration feature. 79 // +optional 80 optional k8s.io.api.core.v1.PersistentVolumeSpec inlineVolumeSpec = 2; 81} 82 83// VolumeAttachmentSpec is the specification of a VolumeAttachment request. 84message VolumeAttachmentSpec { 85 // Attacher indicates the name of the volume driver that MUST handle this 86 // request. This is the name returned by GetPluginName(). 87 optional string attacher = 1; 88 89 // Source represents the volume that should be attached. 90 optional VolumeAttachmentSource source = 2; 91 92 // The node that the volume should be attached to. 93 optional string nodeName = 3; 94} 95 96// VolumeAttachmentStatus is the status of a VolumeAttachment request. 97message VolumeAttachmentStatus { 98 // Indicates the volume is successfully attached. 99 // This field must only be set by the entity completing the attach 100 // operation, i.e. the external-attacher. 101 optional bool attached = 1; 102 103 // Upon successful attach, this field is populated with any 104 // information returned by the attach operation that must be passed 105 // into subsequent WaitForAttach or Mount calls. 106 // This field must only be set by the entity completing the attach 107 // operation, i.e. the external-attacher. 108 // +optional 109 map<string, string> attachmentMetadata = 2; 110 111 // The last error encountered during attach operation, if any. 112 // This field must only be set by the entity completing the attach 113 // operation, i.e. the external-attacher. 114 // +optional 115 optional VolumeError attachError = 3; 116 117 // The last error encountered during detach operation, if any. 118 // This field must only be set by the entity completing the detach 119 // operation, i.e. the external-attacher. 120 // +optional 121 optional VolumeError detachError = 4; 122} 123 124// VolumeError captures an error encountered during a volume operation. 125message VolumeError { 126 // Time the error was encountered. 127 // +optional 128 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1; 129 130 // String detailing the error encountered during Attach or Detach operation. 131 // This string maybe logged, so it should not contain sensitive 132 // information. 133 // +optional 134 optional string message = 2; 135} 136 137