mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Generated files
This commit is contained in:
parent
b9d9b7f16f
commit
e95b188656
210
pkg/apis/storage/v1/zz_generated.conversion.go
generated
210
pkg/apis/storage/v1/zz_generated.conversion.go
generated
@ -58,6 +58,66 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeAttachment)(nil), (*storage.VolumeAttachment)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeAttachment_To_storage_VolumeAttachment(a.(*v1.VolumeAttachment), b.(*storage.VolumeAttachment), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.VolumeAttachment)(nil), (*v1.VolumeAttachment)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_VolumeAttachment_To_v1_VolumeAttachment(a.(*storage.VolumeAttachment), b.(*v1.VolumeAttachment), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeAttachmentList)(nil), (*storage.VolumeAttachmentList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeAttachmentList_To_storage_VolumeAttachmentList(a.(*v1.VolumeAttachmentList), b.(*storage.VolumeAttachmentList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.VolumeAttachmentList)(nil), (*v1.VolumeAttachmentList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_VolumeAttachmentList_To_v1_VolumeAttachmentList(a.(*storage.VolumeAttachmentList), b.(*v1.VolumeAttachmentList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeAttachmentSource)(nil), (*storage.VolumeAttachmentSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(a.(*v1.VolumeAttachmentSource), b.(*storage.VolumeAttachmentSource), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.VolumeAttachmentSource)(nil), (*v1.VolumeAttachmentSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_VolumeAttachmentSource_To_v1_VolumeAttachmentSource(a.(*storage.VolumeAttachmentSource), b.(*v1.VolumeAttachmentSource), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeAttachmentSpec)(nil), (*storage.VolumeAttachmentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(a.(*v1.VolumeAttachmentSpec), b.(*storage.VolumeAttachmentSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.VolumeAttachmentSpec)(nil), (*v1.VolumeAttachmentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_VolumeAttachmentSpec_To_v1_VolumeAttachmentSpec(a.(*storage.VolumeAttachmentSpec), b.(*v1.VolumeAttachmentSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeAttachmentStatus)(nil), (*storage.VolumeAttachmentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(a.(*v1.VolumeAttachmentStatus), b.(*storage.VolumeAttachmentStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.VolumeAttachmentStatus)(nil), (*v1.VolumeAttachmentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_VolumeAttachmentStatus_To_v1_VolumeAttachmentStatus(a.(*storage.VolumeAttachmentStatus), b.(*v1.VolumeAttachmentStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeError)(nil), (*storage.VolumeError)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeError_To_storage_VolumeError(a.(*v1.VolumeError), b.(*storage.VolumeError), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.VolumeError)(nil), (*v1.VolumeError)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_VolumeError_To_v1_VolumeError(a.(*storage.VolumeError), b.(*v1.VolumeError), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -116,3 +176,153 @@ func autoConvert_storage_StorageClassList_To_v1_StorageClassList(in *storage.Sto
|
||||
func Convert_storage_StorageClassList_To_v1_StorageClassList(in *storage.StorageClassList, out *v1.StorageClassList, s conversion.Scope) error {
|
||||
return autoConvert_storage_StorageClassList_To_v1_StorageClassList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeAttachment_To_storage_VolumeAttachment(in *v1.VolumeAttachment, out *storage.VolumeAttachment, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_VolumeAttachment_To_storage_VolumeAttachment is an autogenerated conversion function.
|
||||
func Convert_v1_VolumeAttachment_To_storage_VolumeAttachment(in *v1.VolumeAttachment, out *storage.VolumeAttachment, s conversion.Scope) error {
|
||||
return autoConvert_v1_VolumeAttachment_To_storage_VolumeAttachment(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachment_To_v1_VolumeAttachment(in *storage.VolumeAttachment, out *v1.VolumeAttachment, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_storage_VolumeAttachmentSpec_To_v1_VolumeAttachmentSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_storage_VolumeAttachmentStatus_To_v1_VolumeAttachmentStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachment_To_v1_VolumeAttachment is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachment_To_v1_VolumeAttachment(in *storage.VolumeAttachment, out *v1.VolumeAttachment, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachment_To_v1_VolumeAttachment(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeAttachmentList_To_storage_VolumeAttachmentList(in *v1.VolumeAttachmentList, out *storage.VolumeAttachmentList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]storage.VolumeAttachment)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_VolumeAttachmentList_To_storage_VolumeAttachmentList is an autogenerated conversion function.
|
||||
func Convert_v1_VolumeAttachmentList_To_storage_VolumeAttachmentList(in *v1.VolumeAttachmentList, out *storage.VolumeAttachmentList, s conversion.Scope) error {
|
||||
return autoConvert_v1_VolumeAttachmentList_To_storage_VolumeAttachmentList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentList_To_v1_VolumeAttachmentList(in *storage.VolumeAttachmentList, out *v1.VolumeAttachmentList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]v1.VolumeAttachment)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentList_To_v1_VolumeAttachmentList is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentList_To_v1_VolumeAttachmentList(in *storage.VolumeAttachmentList, out *v1.VolumeAttachmentList, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentList_To_v1_VolumeAttachmentList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(in *v1.VolumeAttachmentSource, out *storage.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
out.PersistentVolumeName = (*string)(unsafe.Pointer(in.PersistentVolumeName))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource is an autogenerated conversion function.
|
||||
func Convert_v1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(in *v1.VolumeAttachmentSource, out *storage.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
return autoConvert_v1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentSource_To_v1_VolumeAttachmentSource(in *storage.VolumeAttachmentSource, out *v1.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
out.PersistentVolumeName = (*string)(unsafe.Pointer(in.PersistentVolumeName))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentSource_To_v1_VolumeAttachmentSource is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentSource_To_v1_VolumeAttachmentSource(in *storage.VolumeAttachmentSource, out *v1.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentSource_To_v1_VolumeAttachmentSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(in *v1.VolumeAttachmentSpec, out *storage.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
out.Attacher = in.Attacher
|
||||
if err := Convert_v1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(&in.Source, &out.Source, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.NodeName = in.NodeName
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec is an autogenerated conversion function.
|
||||
func Convert_v1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(in *v1.VolumeAttachmentSpec, out *storage.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentSpec_To_v1_VolumeAttachmentSpec(in *storage.VolumeAttachmentSpec, out *v1.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
out.Attacher = in.Attacher
|
||||
if err := Convert_storage_VolumeAttachmentSource_To_v1_VolumeAttachmentSource(&in.Source, &out.Source, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.NodeName = in.NodeName
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentSpec_To_v1_VolumeAttachmentSpec is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentSpec_To_v1_VolumeAttachmentSpec(in *storage.VolumeAttachmentSpec, out *v1.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentSpec_To_v1_VolumeAttachmentSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(in *v1.VolumeAttachmentStatus, out *storage.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
out.Attached = in.Attached
|
||||
out.AttachmentMetadata = *(*map[string]string)(unsafe.Pointer(&in.AttachmentMetadata))
|
||||
out.AttachError = (*storage.VolumeError)(unsafe.Pointer(in.AttachError))
|
||||
out.DetachError = (*storage.VolumeError)(unsafe.Pointer(in.DetachError))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus is an autogenerated conversion function.
|
||||
func Convert_v1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(in *v1.VolumeAttachmentStatus, out *storage.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
return autoConvert_v1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentStatus_To_v1_VolumeAttachmentStatus(in *storage.VolumeAttachmentStatus, out *v1.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
out.Attached = in.Attached
|
||||
out.AttachmentMetadata = *(*map[string]string)(unsafe.Pointer(&in.AttachmentMetadata))
|
||||
out.AttachError = (*v1.VolumeError)(unsafe.Pointer(in.AttachError))
|
||||
out.DetachError = (*v1.VolumeError)(unsafe.Pointer(in.DetachError))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentStatus_To_v1_VolumeAttachmentStatus is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentStatus_To_v1_VolumeAttachmentStatus(in *storage.VolumeAttachmentStatus, out *v1.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentStatus_To_v1_VolumeAttachmentStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeError_To_storage_VolumeError(in *v1.VolumeError, out *storage.VolumeError, s conversion.Scope) error {
|
||||
out.Time = in.Time
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_VolumeError_To_storage_VolumeError is an autogenerated conversion function.
|
||||
func Convert_v1_VolumeError_To_storage_VolumeError(in *v1.VolumeError, out *storage.VolumeError, s conversion.Scope) error {
|
||||
return autoConvert_v1_VolumeError_To_storage_VolumeError(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeError_To_v1_VolumeError(in *storage.VolumeError, out *v1.VolumeError, s conversion.Scope) error {
|
||||
out.Time = in.Time
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeError_To_v1_VolumeError is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeError_To_v1_VolumeError(in *storage.VolumeError, out *v1.VolumeError, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeError_To_v1_VolumeError(in, out, s)
|
||||
}
|
||||
|
@ -79,6 +79,10 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API
|
||||
storageClassStorage := storageclassstore.NewREST(restOptionsGetter)
|
||||
storage["storageclasses"] = storageClassStorage
|
||||
|
||||
// volumeattachments
|
||||
volumeAttachmentStorage := volumeattachmentstore.NewREST(restOptionsGetter)
|
||||
storage["volumeattachments"] = volumeAttachmentStorage
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
|
1369
staging/src/k8s.io/api/storage/v1/generated.pb.go
generated
1369
staging/src/k8s.io/api/storage/v1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@ -88,3 +88,99 @@ message StorageClassList {
|
||||
repeated StorageClass items = 2;
|
||||
}
|
||||
|
||||
// VolumeAttachment captures the intent to attach or detach the specified volume
|
||||
// to/from the specified node.
|
||||
//
|
||||
// VolumeAttachment objects are non-namespaced.
|
||||
message VolumeAttachment {
|
||||
// Standard object metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Specification of the desired attach/detach volume behavior.
|
||||
// Populated by the Kubernetes system.
|
||||
optional VolumeAttachmentSpec spec = 2;
|
||||
|
||||
// Status of the VolumeAttachment request.
|
||||
// Populated by the entity completing the attach or detach
|
||||
// operation, i.e. the external-attacher.
|
||||
// +optional
|
||||
optional VolumeAttachmentStatus status = 3;
|
||||
}
|
||||
|
||||
// VolumeAttachmentList is a collection of VolumeAttachment objects.
|
||||
message VolumeAttachmentList {
|
||||
// Standard list metadata
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of VolumeAttachments
|
||||
repeated VolumeAttachment items = 2;
|
||||
}
|
||||
|
||||
// VolumeAttachmentSource represents a volume that should be attached.
|
||||
// Right now only PersistenVolumes can be attached via external attacher,
|
||||
// in future we may allow also inline volumes in pods.
|
||||
// Exactly one member can be set.
|
||||
message VolumeAttachmentSource {
|
||||
// Name of the persistent volume to attach.
|
||||
// +optional
|
||||
optional string persistentVolumeName = 1;
|
||||
}
|
||||
|
||||
// VolumeAttachmentSpec is the specification of a VolumeAttachment request.
|
||||
message VolumeAttachmentSpec {
|
||||
// Attacher indicates the name of the volume driver that MUST handle this
|
||||
// request. This is the name returned by GetPluginName().
|
||||
optional string attacher = 1;
|
||||
|
||||
// Source represents the volume that should be attached.
|
||||
optional VolumeAttachmentSource source = 2;
|
||||
|
||||
// The node that the volume should be attached to.
|
||||
optional string nodeName = 3;
|
||||
}
|
||||
|
||||
// VolumeAttachmentStatus is the status of a VolumeAttachment request.
|
||||
message VolumeAttachmentStatus {
|
||||
// Indicates the volume is successfully attached.
|
||||
// This field must only be set by the entity completing the attach
|
||||
// operation, i.e. the external-attacher.
|
||||
optional bool attached = 1;
|
||||
|
||||
// Upon successful attach, this field is populated with any
|
||||
// information returned by the attach operation that must be passed
|
||||
// into subsequent WaitForAttach or Mount calls.
|
||||
// This field must only be set by the entity completing the attach
|
||||
// operation, i.e. the external-attacher.
|
||||
// +optional
|
||||
map<string, string> attachmentMetadata = 2;
|
||||
|
||||
// The last error encountered during attach operation, if any.
|
||||
// This field must only be set by the entity completing the attach
|
||||
// operation, i.e. the external-attacher.
|
||||
// +optional
|
||||
optional VolumeError attachError = 3;
|
||||
|
||||
// The last error encountered during detach operation, if any.
|
||||
// This field must only be set by the entity completing the detach
|
||||
// operation, i.e. the external-attacher.
|
||||
// +optional
|
||||
optional VolumeError detachError = 4;
|
||||
}
|
||||
|
||||
// VolumeError captures an error encountered during a volume operation.
|
||||
message VolumeError {
|
||||
// Time the error was encountered.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
|
||||
|
||||
// String detailing the error encountered during Attach or Detach operation.
|
||||
// This string maybe logged, so it should not contain sensitive
|
||||
// information.
|
||||
// +optional
|
||||
optional string message = 2;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,9 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&StorageClass{},
|
||||
&StorageClassList{},
|
||||
|
||||
&VolumeAttachment{},
|
||||
&VolumeAttachmentList{},
|
||||
)
|
||||
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
|
@ -53,4 +53,67 @@ func (StorageClassList) SwaggerDoc() map[string]string {
|
||||
return map_StorageClassList
|
||||
}
|
||||
|
||||
var map_VolumeAttachment = map[string]string{
|
||||
"": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.",
|
||||
"metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"spec": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.",
|
||||
"status": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.",
|
||||
}
|
||||
|
||||
func (VolumeAttachment) SwaggerDoc() map[string]string {
|
||||
return map_VolumeAttachment
|
||||
}
|
||||
|
||||
var map_VolumeAttachmentList = map[string]string{
|
||||
"": "VolumeAttachmentList is a collection of VolumeAttachment objects.",
|
||||
"metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "Items is the list of VolumeAttachments",
|
||||
}
|
||||
|
||||
func (VolumeAttachmentList) SwaggerDoc() map[string]string {
|
||||
return map_VolumeAttachmentList
|
||||
}
|
||||
|
||||
var map_VolumeAttachmentSource = map[string]string{
|
||||
"": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.",
|
||||
"persistentVolumeName": "Name of the persistent volume to attach.",
|
||||
}
|
||||
|
||||
func (VolumeAttachmentSource) SwaggerDoc() map[string]string {
|
||||
return map_VolumeAttachmentSource
|
||||
}
|
||||
|
||||
var map_VolumeAttachmentSpec = map[string]string{
|
||||
"": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.",
|
||||
"attacher": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().",
|
||||
"source": "Source represents the volume that should be attached.",
|
||||
"nodeName": "The node that the volume should be attached to.",
|
||||
}
|
||||
|
||||
func (VolumeAttachmentSpec) SwaggerDoc() map[string]string {
|
||||
return map_VolumeAttachmentSpec
|
||||
}
|
||||
|
||||
var map_VolumeAttachmentStatus = map[string]string{
|
||||
"": "VolumeAttachmentStatus is the status of a VolumeAttachment request.",
|
||||
"attached": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
|
||||
"attachmentMetadata": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
|
||||
"attachError": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.",
|
||||
"detachError": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.",
|
||||
}
|
||||
|
||||
func (VolumeAttachmentStatus) SwaggerDoc() map[string]string {
|
||||
return map_VolumeAttachmentStatus
|
||||
}
|
||||
|
||||
var map_VolumeError = map[string]string{
|
||||
"": "VolumeError captures an error encountered during a volume operation.",
|
||||
"time": "Time the error was encountered.",
|
||||
"message": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.",
|
||||
}
|
||||
|
||||
func (VolumeError) SwaggerDoc() map[string]string {
|
||||
return map_VolumeError
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
||||
|
@ -117,3 +117,152 @@ func (in *StorageClassList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeAttachment) DeepCopyInto(out *VolumeAttachment) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachment.
|
||||
func (in *VolumeAttachment) DeepCopy() *VolumeAttachment {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeAttachment)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeAttachment) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeAttachmentList) DeepCopyInto(out *VolumeAttachmentList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]VolumeAttachment, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentList.
|
||||
func (in *VolumeAttachmentList) DeepCopy() *VolumeAttachmentList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeAttachmentList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeAttachmentList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeAttachmentSource) DeepCopyInto(out *VolumeAttachmentSource) {
|
||||
*out = *in
|
||||
if in.PersistentVolumeName != nil {
|
||||
in, out := &in.PersistentVolumeName, &out.PersistentVolumeName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSource.
|
||||
func (in *VolumeAttachmentSource) DeepCopy() *VolumeAttachmentSource {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeAttachmentSource)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeAttachmentSpec) DeepCopyInto(out *VolumeAttachmentSpec) {
|
||||
*out = *in
|
||||
in.Source.DeepCopyInto(&out.Source)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSpec.
|
||||
func (in *VolumeAttachmentSpec) DeepCopy() *VolumeAttachmentSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeAttachmentSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeAttachmentStatus) DeepCopyInto(out *VolumeAttachmentStatus) {
|
||||
*out = *in
|
||||
if in.AttachmentMetadata != nil {
|
||||
in, out := &in.AttachmentMetadata, &out.AttachmentMetadata
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.AttachError != nil {
|
||||
in, out := &in.AttachError, &out.AttachError
|
||||
*out = new(VolumeError)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.DetachError != nil {
|
||||
in, out := &in.DetachError, &out.DetachError
|
||||
*out = new(VolumeError)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentStatus.
|
||||
func (in *VolumeAttachmentStatus) DeepCopy() *VolumeAttachmentStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeAttachmentStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeError) DeepCopyInto(out *VolumeError) {
|
||||
*out = *in
|
||||
in.Time.DeepCopyInto(&out.Time)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeError.
|
||||
func (in *VolumeError) DeepCopy() *VolumeError {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeError)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
@ -262,6 +262,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=storage.k8s.io, Version=v1
|
||||
case storagev1.SchemeGroupVersion.WithResource("storageclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil
|
||||
case storagev1.SchemeGroupVersion.WithResource("volumeattachments"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().VolumeAttachments().Informer()}, nil
|
||||
|
||||
// Group=storage.k8s.io, Version=v1alpha1
|
||||
case storagev1alpha1.SchemeGroupVersion.WithResource("volumeattachments"):
|
||||
|
@ -10,6 +10,7 @@ go_library(
|
||||
srcs = [
|
||||
"interface.go",
|
||||
"storageclass.go",
|
||||
"volumeattachment.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/storage/v1",
|
||||
importpath = "k8s.io/client-go/informers/storage/v1",
|
||||
|
@ -26,6 +26,8 @@ import (
|
||||
type Interface interface {
|
||||
// StorageClasses returns a StorageClassInformer.
|
||||
StorageClasses() StorageClassInformer
|
||||
// VolumeAttachments returns a VolumeAttachmentInformer.
|
||||
VolumeAttachments() VolumeAttachmentInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
func (v *version) StorageClasses() StorageClassInformer {
|
||||
return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// VolumeAttachments returns a VolumeAttachmentInformer.
|
||||
func (v *version) VolumeAttachments() VolumeAttachmentInformer {
|
||||
return &volumeAttachmentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/storage/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// VolumeAttachmentInformer provides access to a shared informer and lister for
|
||||
// VolumeAttachments.
|
||||
type VolumeAttachmentInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.VolumeAttachmentLister
|
||||
}
|
||||
|
||||
type volumeAttachmentInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewVolumeAttachmentInformer constructs a new informer for VolumeAttachment type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewVolumeAttachmentInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredVolumeAttachmentInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredVolumeAttachmentInformer constructs a new informer for VolumeAttachment type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1().VolumeAttachments().List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1().VolumeAttachments().Watch(options)
|
||||
},
|
||||
},
|
||||
&storagev1.VolumeAttachment{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *volumeAttachmentInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredVolumeAttachmentInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *volumeAttachmentInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&storagev1.VolumeAttachment{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *volumeAttachmentInformer) Lister() v1.VolumeAttachmentLister {
|
||||
return v1.NewVolumeAttachmentLister(f.Informer().GetIndexer())
|
||||
}
|
@ -12,6 +12,7 @@ go_library(
|
||||
"generated_expansion.go",
|
||||
"storage_client.go",
|
||||
"storageclass.go",
|
||||
"volumeattachment.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/storage/v1",
|
||||
importpath = "k8s.io/client-go/kubernetes/typed/storage/v1",
|
||||
|
@ -11,6 +11,7 @@ go_library(
|
||||
"doc.go",
|
||||
"fake_storage_client.go",
|
||||
"fake_storageclass.go",
|
||||
"fake_volumeattachment.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake",
|
||||
importpath = "k8s.io/client-go/kubernetes/typed/storage/v1/fake",
|
||||
|
@ -32,6 +32,10 @@ func (c *FakeStorageV1) StorageClasses() v1.StorageClassInterface {
|
||||
return &FakeStorageClasses{c}
|
||||
}
|
||||
|
||||
func (c *FakeStorageV1) VolumeAttachments() v1.VolumeAttachmentInterface {
|
||||
return &FakeVolumeAttachments{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeStorageV1) RESTClient() rest.Interface {
|
||||
|
@ -0,0 +1,131 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeVolumeAttachments implements VolumeAttachmentInterface
|
||||
type FakeVolumeAttachments struct {
|
||||
Fake *FakeStorageV1
|
||||
}
|
||||
|
||||
var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "volumeattachments"}
|
||||
|
||||
var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "VolumeAttachment"}
|
||||
|
||||
// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any.
|
||||
func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result *storagev1.VolumeAttachment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &storagev1.VolumeAttachment{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storagev1.VolumeAttachment), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors.
|
||||
func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *storagev1.VolumeAttachmentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &storagev1.VolumeAttachmentList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &storagev1.VolumeAttachmentList{ListMeta: obj.(*storagev1.VolumeAttachmentList).ListMeta}
|
||||
for _, item := range obj.(*storagev1.VolumeAttachmentList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested volumeAttachments.
|
||||
func (c *FakeVolumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
|
||||
func (c *FakeVolumeAttachments) Create(volumeAttachment *storagev1.VolumeAttachment) (result *storagev1.VolumeAttachment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storagev1.VolumeAttachment), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
|
||||
func (c *FakeVolumeAttachments) Update(volumeAttachment *storagev1.VolumeAttachment) (result *storagev1.VolumeAttachment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storagev1.VolumeAttachment), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *storagev1.VolumeAttachment) (*storagev1.VolumeAttachment, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &storagev1.VolumeAttachment{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storagev1.VolumeAttachment), err
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVolumeAttachments) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(volumeattachmentsResource, name), &storagev1.VolumeAttachment{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVolumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &storagev1.VolumeAttachmentList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeAttachment.
|
||||
func (c *FakeVolumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.VolumeAttachment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &storagev1.VolumeAttachment{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storagev1.VolumeAttachment), err
|
||||
}
|
@ -19,3 +19,5 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
type StorageClassExpansion interface{}
|
||||
|
||||
type VolumeAttachmentExpansion interface{}
|
||||
|
@ -28,6 +28,7 @@ import (
|
||||
type StorageV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
StorageClassesGetter
|
||||
VolumeAttachmentsGetter
|
||||
}
|
||||
|
||||
// StorageV1Client is used to interact with features provided by the storage.k8s.io group.
|
||||
@ -39,6 +40,10 @@ func (c *StorageV1Client) StorageClasses() StorageClassInterface {
|
||||
return newStorageClasses(c)
|
||||
}
|
||||
|
||||
func (c *StorageV1Client) VolumeAttachments() VolumeAttachmentInterface {
|
||||
return newVolumeAttachments(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new StorageV1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*StorageV1Client, error) {
|
||||
config := *c
|
||||
|
@ -0,0 +1,163 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface.
|
||||
// A group's client should implement this interface.
|
||||
type VolumeAttachmentsGetter interface {
|
||||
VolumeAttachments() VolumeAttachmentInterface
|
||||
}
|
||||
|
||||
// VolumeAttachmentInterface has methods to work with VolumeAttachment resources.
|
||||
type VolumeAttachmentInterface interface {
|
||||
Create(*v1.VolumeAttachment) (*v1.VolumeAttachment, error)
|
||||
Update(*v1.VolumeAttachment) (*v1.VolumeAttachment, error)
|
||||
UpdateStatus(*v1.VolumeAttachment) (*v1.VolumeAttachment, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.VolumeAttachment, error)
|
||||
List(opts metav1.ListOptions) (*v1.VolumeAttachmentList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeAttachment, err error)
|
||||
VolumeAttachmentExpansion
|
||||
}
|
||||
|
||||
// volumeAttachments implements VolumeAttachmentInterface
|
||||
type volumeAttachments struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newVolumeAttachments returns a VolumeAttachments
|
||||
func newVolumeAttachments(c *StorageV1Client) *volumeAttachments {
|
||||
return &volumeAttachments{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any.
|
||||
func (c *volumeAttachments) Get(name string, options metav1.GetOptions) (result *v1.VolumeAttachment, err error) {
|
||||
result = &v1.VolumeAttachment{}
|
||||
err = c.client.Get().
|
||||
Resource("volumeattachments").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors.
|
||||
func (c *volumeAttachments) List(opts metav1.ListOptions) (result *v1.VolumeAttachmentList, err error) {
|
||||
result = &v1.VolumeAttachmentList{}
|
||||
err = c.client.Get().
|
||||
Resource("volumeattachments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested volumeAttachments.
|
||||
func (c *volumeAttachments) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("volumeattachments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
|
||||
func (c *volumeAttachments) Create(volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) {
|
||||
result = &v1.VolumeAttachment{}
|
||||
err = c.client.Post().
|
||||
Resource("volumeattachments").
|
||||
Body(volumeAttachment).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any.
|
||||
func (c *volumeAttachments) Update(volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) {
|
||||
result = &v1.VolumeAttachment{}
|
||||
err = c.client.Put().
|
||||
Resource("volumeattachments").
|
||||
Name(volumeAttachment.Name).
|
||||
Body(volumeAttachment).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) {
|
||||
result = &v1.VolumeAttachment{}
|
||||
err = c.client.Put().
|
||||
Resource("volumeattachments").
|
||||
Name(volumeAttachment.Name).
|
||||
SubResource("status").
|
||||
Body(volumeAttachment).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs.
|
||||
func (c *volumeAttachments) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("volumeattachments").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *volumeAttachments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("volumeattachments").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeAttachment.
|
||||
func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeAttachment, err error) {
|
||||
result = &v1.VolumeAttachment{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("volumeattachments").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -10,6 +10,7 @@ go_library(
|
||||
srcs = [
|
||||
"expansion_generated.go",
|
||||
"storageclass.go",
|
||||
"volumeattachment.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/listers/storage/v1",
|
||||
importpath = "k8s.io/client-go/listers/storage/v1",
|
||||
|
@ -21,3 +21,7 @@ package v1
|
||||
// StorageClassListerExpansion allows custom methods to be added to
|
||||
// StorageClassLister.
|
||||
type StorageClassListerExpansion interface{}
|
||||
|
||||
// VolumeAttachmentListerExpansion allows custom methods to be added to
|
||||
// VolumeAttachmentLister.
|
||||
type VolumeAttachmentListerExpansion interface{}
|
||||
|
@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/storage/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// VolumeAttachmentLister helps list VolumeAttachments.
|
||||
type VolumeAttachmentLister interface {
|
||||
// List lists all VolumeAttachments in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.VolumeAttachment, err error)
|
||||
// Get retrieves the VolumeAttachment from the index for a given name.
|
||||
Get(name string) (*v1.VolumeAttachment, error)
|
||||
VolumeAttachmentListerExpansion
|
||||
}
|
||||
|
||||
// volumeAttachmentLister implements the VolumeAttachmentLister interface.
|
||||
type volumeAttachmentLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewVolumeAttachmentLister returns a new VolumeAttachmentLister.
|
||||
func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister {
|
||||
return &volumeAttachmentLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all VolumeAttachments in the indexer.
|
||||
func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1.VolumeAttachment, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.VolumeAttachment))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the VolumeAttachment from the index for a given name.
|
||||
func (s *volumeAttachmentLister) Get(name string) (*v1.VolumeAttachment, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("volumeattachment"), name)
|
||||
}
|
||||
return obj.(*v1.VolumeAttachment), nil
|
||||
}
|
@ -291,6 +291,14 @@ func GetEtcdStorageData() map[schema.GroupVersionResource]StorageData {
|
||||
},
|
||||
// --
|
||||
|
||||
// k8s.io/kubernetes/pkg/apis/storage/v1
|
||||
gvr("storage.k8s.io", "v1", "volumeattachments"): {
|
||||
Stub: `{"metadata": {"name": "va3"}, "spec": {"attacher": "gce", "nodeName": "localhost", "source": {"persistentVolumeName": "pv3"}}}`,
|
||||
ExpectedEtcdPath: "/registry/volumeattachments/va3",
|
||||
ExpectedGVK: gvkP("storage.k8s.io", "v1beta1", "VolumeAttachment"),
|
||||
},
|
||||
// --
|
||||
|
||||
// k8s.io/kubernetes/pkg/apis/storage/v1beta1
|
||||
gvr("storage.k8s.io", "v1beta1", "storageclasses"): {
|
||||
Stub: `{"metadata": {"name": "sc1"}, "provisioner": "aws"}`,
|
||||
|
Loading…
Reference in New Issue
Block a user