mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Add generated files
This commit is contained in:
parent
bb45b8ee34
commit
743d3a26e9
232
pkg/apis/storage/v1beta1/zz_generated.conversion.go
generated
232
pkg/apis/storage/v1beta1/zz_generated.conversion.go
generated
@ -38,6 +38,76 @@ func init() {
|
||||
// RegisterConversions adds conversion functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(s *runtime.Scheme) error {
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.CSIDriver)(nil), (*storage.CSIDriver)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_CSIDriver_To_storage_CSIDriver(a.(*v1beta1.CSIDriver), b.(*storage.CSIDriver), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.CSIDriver)(nil), (*v1beta1.CSIDriver)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_CSIDriver_To_v1beta1_CSIDriver(a.(*storage.CSIDriver), b.(*v1beta1.CSIDriver), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.CSIDriverList)(nil), (*storage.CSIDriverList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_CSIDriverList_To_storage_CSIDriverList(a.(*v1beta1.CSIDriverList), b.(*storage.CSIDriverList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.CSIDriverList)(nil), (*v1beta1.CSIDriverList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_CSIDriverList_To_v1beta1_CSIDriverList(a.(*storage.CSIDriverList), b.(*v1beta1.CSIDriverList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.CSIDriverSpec)(nil), (*storage.CSIDriverSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec(a.(*v1beta1.CSIDriverSpec), b.(*storage.CSIDriverSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.CSIDriverSpec)(nil), (*v1beta1.CSIDriverSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_CSIDriverSpec_To_v1beta1_CSIDriverSpec(a.(*storage.CSIDriverSpec), b.(*v1beta1.CSIDriverSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.CSINode)(nil), (*storage.CSINode)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_CSINode_To_storage_CSINode(a.(*v1beta1.CSINode), b.(*storage.CSINode), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.CSINode)(nil), (*v1beta1.CSINode)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_CSINode_To_v1beta1_CSINode(a.(*storage.CSINode), b.(*v1beta1.CSINode), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.CSINodeDriver)(nil), (*storage.CSINodeDriver)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_CSINodeDriver_To_storage_CSINodeDriver(a.(*v1beta1.CSINodeDriver), b.(*storage.CSINodeDriver), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.CSINodeDriver)(nil), (*v1beta1.CSINodeDriver)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_CSINodeDriver_To_v1beta1_CSINodeDriver(a.(*storage.CSINodeDriver), b.(*v1beta1.CSINodeDriver), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.CSINodeList)(nil), (*storage.CSINodeList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_CSINodeList_To_storage_CSINodeList(a.(*v1beta1.CSINodeList), b.(*storage.CSINodeList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.CSINodeList)(nil), (*v1beta1.CSINodeList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_CSINodeList_To_v1beta1_CSINodeList(a.(*storage.CSINodeList), b.(*v1beta1.CSINodeList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.CSINodeSpec)(nil), (*storage.CSINodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_CSINodeSpec_To_storage_CSINodeSpec(a.(*v1beta1.CSINodeSpec), b.(*storage.CSINodeSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*storage.CSINodeSpec)(nil), (*v1beta1.CSINodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_storage_CSINodeSpec_To_v1beta1_CSINodeSpec(a.(*storage.CSINodeSpec), b.(*v1beta1.CSINodeSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.StorageClass)(nil), (*storage.StorageClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_StorageClass_To_storage_StorageClass(a.(*v1beta1.StorageClass), b.(*storage.StorageClass), scope)
|
||||
}); err != nil {
|
||||
@ -121,6 +191,168 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_CSIDriver_To_storage_CSIDriver(in *v1beta1.CSIDriver, out *storage.CSIDriver, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_CSIDriver_To_storage_CSIDriver is an autogenerated conversion function.
|
||||
func Convert_v1beta1_CSIDriver_To_storage_CSIDriver(in *v1beta1.CSIDriver, out *storage.CSIDriver, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_CSIDriver_To_storage_CSIDriver(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_CSIDriver_To_v1beta1_CSIDriver(in *storage.CSIDriver, out *v1beta1.CSIDriver, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_storage_CSIDriverSpec_To_v1beta1_CSIDriverSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_CSIDriver_To_v1beta1_CSIDriver is an autogenerated conversion function.
|
||||
func Convert_storage_CSIDriver_To_v1beta1_CSIDriver(in *storage.CSIDriver, out *v1beta1.CSIDriver, s conversion.Scope) error {
|
||||
return autoConvert_storage_CSIDriver_To_v1beta1_CSIDriver(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_CSIDriverList_To_storage_CSIDriverList(in *v1beta1.CSIDriverList, out *storage.CSIDriverList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]storage.CSIDriver)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_CSIDriverList_To_storage_CSIDriverList is an autogenerated conversion function.
|
||||
func Convert_v1beta1_CSIDriverList_To_storage_CSIDriverList(in *v1beta1.CSIDriverList, out *storage.CSIDriverList, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_CSIDriverList_To_storage_CSIDriverList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_CSIDriverList_To_v1beta1_CSIDriverList(in *storage.CSIDriverList, out *v1beta1.CSIDriverList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]v1beta1.CSIDriver)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_CSIDriverList_To_v1beta1_CSIDriverList is an autogenerated conversion function.
|
||||
func Convert_storage_CSIDriverList_To_v1beta1_CSIDriverList(in *storage.CSIDriverList, out *v1beta1.CSIDriverList, s conversion.Scope) error {
|
||||
return autoConvert_storage_CSIDriverList_To_v1beta1_CSIDriverList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec(in *v1beta1.CSIDriverSpec, out *storage.CSIDriverSpec, s conversion.Scope) error {
|
||||
out.AttachRequired = (*bool)(unsafe.Pointer(in.AttachRequired))
|
||||
out.PodInfoOnMount = (*bool)(unsafe.Pointer(in.PodInfoOnMount))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec is an autogenerated conversion function.
|
||||
func Convert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec(in *v1beta1.CSIDriverSpec, out *storage.CSIDriverSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_CSIDriverSpec_To_v1beta1_CSIDriverSpec(in *storage.CSIDriverSpec, out *v1beta1.CSIDriverSpec, s conversion.Scope) error {
|
||||
out.AttachRequired = (*bool)(unsafe.Pointer(in.AttachRequired))
|
||||
out.PodInfoOnMount = (*bool)(unsafe.Pointer(in.PodInfoOnMount))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_CSIDriverSpec_To_v1beta1_CSIDriverSpec is an autogenerated conversion function.
|
||||
func Convert_storage_CSIDriverSpec_To_v1beta1_CSIDriverSpec(in *storage.CSIDriverSpec, out *v1beta1.CSIDriverSpec, s conversion.Scope) error {
|
||||
return autoConvert_storage_CSIDriverSpec_To_v1beta1_CSIDriverSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_CSINode_To_storage_CSINode(in *v1beta1.CSINode, out *storage.CSINode, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1beta1_CSINodeSpec_To_storage_CSINodeSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_CSINode_To_storage_CSINode is an autogenerated conversion function.
|
||||
func Convert_v1beta1_CSINode_To_storage_CSINode(in *v1beta1.CSINode, out *storage.CSINode, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_CSINode_To_storage_CSINode(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_CSINode_To_v1beta1_CSINode(in *storage.CSINode, out *v1beta1.CSINode, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_storage_CSINodeSpec_To_v1beta1_CSINodeSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_CSINode_To_v1beta1_CSINode is an autogenerated conversion function.
|
||||
func Convert_storage_CSINode_To_v1beta1_CSINode(in *storage.CSINode, out *v1beta1.CSINode, s conversion.Scope) error {
|
||||
return autoConvert_storage_CSINode_To_v1beta1_CSINode(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_CSINodeDriver_To_storage_CSINodeDriver(in *v1beta1.CSINodeDriver, out *storage.CSINodeDriver, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
out.NodeID = in.NodeID
|
||||
out.TopologyKeys = *(*[]string)(unsafe.Pointer(&in.TopologyKeys))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_CSINodeDriver_To_storage_CSINodeDriver is an autogenerated conversion function.
|
||||
func Convert_v1beta1_CSINodeDriver_To_storage_CSINodeDriver(in *v1beta1.CSINodeDriver, out *storage.CSINodeDriver, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_CSINodeDriver_To_storage_CSINodeDriver(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_CSINodeDriver_To_v1beta1_CSINodeDriver(in *storage.CSINodeDriver, out *v1beta1.CSINodeDriver, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
out.NodeID = in.NodeID
|
||||
out.TopologyKeys = *(*[]string)(unsafe.Pointer(&in.TopologyKeys))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_CSINodeDriver_To_v1beta1_CSINodeDriver is an autogenerated conversion function.
|
||||
func Convert_storage_CSINodeDriver_To_v1beta1_CSINodeDriver(in *storage.CSINodeDriver, out *v1beta1.CSINodeDriver, s conversion.Scope) error {
|
||||
return autoConvert_storage_CSINodeDriver_To_v1beta1_CSINodeDriver(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_CSINodeList_To_storage_CSINodeList(in *v1beta1.CSINodeList, out *storage.CSINodeList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]storage.CSINode)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_CSINodeList_To_storage_CSINodeList is an autogenerated conversion function.
|
||||
func Convert_v1beta1_CSINodeList_To_storage_CSINodeList(in *v1beta1.CSINodeList, out *storage.CSINodeList, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_CSINodeList_To_storage_CSINodeList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_CSINodeList_To_v1beta1_CSINodeList(in *storage.CSINodeList, out *v1beta1.CSINodeList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]v1beta1.CSINode)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_CSINodeList_To_v1beta1_CSINodeList is an autogenerated conversion function.
|
||||
func Convert_storage_CSINodeList_To_v1beta1_CSINodeList(in *storage.CSINodeList, out *v1beta1.CSINodeList, s conversion.Scope) error {
|
||||
return autoConvert_storage_CSINodeList_To_v1beta1_CSINodeList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_CSINodeSpec_To_storage_CSINodeSpec(in *v1beta1.CSINodeSpec, out *storage.CSINodeSpec, s conversion.Scope) error {
|
||||
out.Drivers = *(*[]storage.CSINodeDriver)(unsafe.Pointer(&in.Drivers))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_CSINodeSpec_To_storage_CSINodeSpec is an autogenerated conversion function.
|
||||
func Convert_v1beta1_CSINodeSpec_To_storage_CSINodeSpec(in *v1beta1.CSINodeSpec, out *storage.CSINodeSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_CSINodeSpec_To_storage_CSINodeSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_CSINodeSpec_To_v1beta1_CSINodeSpec(in *storage.CSINodeSpec, out *v1beta1.CSINodeSpec, s conversion.Scope) error {
|
||||
out.Drivers = *(*[]v1beta1.CSINodeDriver)(unsafe.Pointer(&in.Drivers))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_CSINodeSpec_To_v1beta1_CSINodeSpec is an autogenerated conversion function.
|
||||
func Convert_storage_CSINodeSpec_To_v1beta1_CSINodeSpec(in *storage.CSINodeSpec, out *v1beta1.CSINodeSpec, s conversion.Scope) error {
|
||||
return autoConvert_storage_CSINodeSpec_To_v1beta1_CSINodeSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *v1beta1.StorageClass, out *storage.StorageClass, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Provisioner = in.Provisioner
|
||||
|
13
pkg/apis/storage/v1beta1/zz_generated.defaults.go
generated
13
pkg/apis/storage/v1beta1/zz_generated.defaults.go
generated
@ -29,11 +29,24 @@ import (
|
||||
// Public to allow building arbitrary schemes.
|
||||
// All generated defaulters are covering - they call all nested defaulters.
|
||||
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
scheme.AddTypeDefaultingFunc(&v1beta1.CSIDriver{}, func(obj interface{}) { SetObjectDefaults_CSIDriver(obj.(*v1beta1.CSIDriver)) })
|
||||
scheme.AddTypeDefaultingFunc(&v1beta1.CSIDriverList{}, func(obj interface{}) { SetObjectDefaults_CSIDriverList(obj.(*v1beta1.CSIDriverList)) })
|
||||
scheme.AddTypeDefaultingFunc(&v1beta1.StorageClass{}, func(obj interface{}) { SetObjectDefaults_StorageClass(obj.(*v1beta1.StorageClass)) })
|
||||
scheme.AddTypeDefaultingFunc(&v1beta1.StorageClassList{}, func(obj interface{}) { SetObjectDefaults_StorageClassList(obj.(*v1beta1.StorageClassList)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetObjectDefaults_CSIDriver(in *v1beta1.CSIDriver) {
|
||||
SetDefaults_CSIDriver(in)
|
||||
}
|
||||
|
||||
func SetObjectDefaults_CSIDriverList(in *v1beta1.CSIDriverList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_CSIDriver(a)
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_StorageClass(in *v1beta1.StorageClass) {
|
||||
SetDefaults_StorageClass(in)
|
||||
}
|
||||
|
190
pkg/apis/storage/zz_generated.deepcopy.go
generated
190
pkg/apis/storage/zz_generated.deepcopy.go
generated
@ -25,6 +25,196 @@ import (
|
||||
core "k8s.io/kubernetes/pkg/apis/core"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CSIDriver) DeepCopyInto(out *CSIDriver) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriver.
|
||||
func (in *CSIDriver) DeepCopy() *CSIDriver {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSIDriver)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSIDriver) 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 *CSIDriverList) DeepCopyInto(out *CSIDriverList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]CSIDriver, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverList.
|
||||
func (in *CSIDriverList) DeepCopy() *CSIDriverList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSIDriverList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSIDriverList) 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 *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) {
|
||||
*out = *in
|
||||
if in.AttachRequired != nil {
|
||||
in, out := &in.AttachRequired, &out.AttachRequired
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.PodInfoOnMount != nil {
|
||||
in, out := &in.PodInfoOnMount, &out.PodInfoOnMount
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverSpec.
|
||||
func (in *CSIDriverSpec) DeepCopy() *CSIDriverSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSIDriverSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CSINode) DeepCopyInto(out *CSINode) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINode.
|
||||
func (in *CSINode) DeepCopy() *CSINode {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINode)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSINode) 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 *CSINodeDriver) DeepCopyInto(out *CSINodeDriver) {
|
||||
*out = *in
|
||||
if in.TopologyKeys != nil {
|
||||
in, out := &in.TopologyKeys, &out.TopologyKeys
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINodeDriver.
|
||||
func (in *CSINodeDriver) DeepCopy() *CSINodeDriver {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINodeDriver)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CSINodeList) DeepCopyInto(out *CSINodeList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]CSINode, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINodeList.
|
||||
func (in *CSINodeList) DeepCopy() *CSINodeList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINodeList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSINodeList) 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 *CSINodeSpec) DeepCopyInto(out *CSINodeSpec) {
|
||||
*out = *in
|
||||
if in.Drivers != nil {
|
||||
in, out := &in.Drivers, &out.Drivers
|
||||
*out = make([]CSINodeDriver, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINodeSpec.
|
||||
func (in *CSINodeSpec) DeepCopy() *CSINodeSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINodeSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *StorageClass) DeepCopyInto(out *StorageClass) {
|
||||
*out = *in
|
||||
|
@ -8,6 +8,8 @@ load(
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"csidriver.go",
|
||||
"csinode.go",
|
||||
"doc.go",
|
||||
"generated_expansion.go",
|
||||
"storage_client.go",
|
||||
|
@ -0,0 +1,164 @@
|
||||
/*
|
||||
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 internalversion
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme"
|
||||
)
|
||||
|
||||
// CSIDriversGetter has a method to return a CSIDriverInterface.
|
||||
// A group's client should implement this interface.
|
||||
type CSIDriversGetter interface {
|
||||
CSIDrivers() CSIDriverInterface
|
||||
}
|
||||
|
||||
// CSIDriverInterface has methods to work with CSIDriver resources.
|
||||
type CSIDriverInterface interface {
|
||||
Create(*storage.CSIDriver) (*storage.CSIDriver, error)
|
||||
Update(*storage.CSIDriver) (*storage.CSIDriver, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*storage.CSIDriver, error)
|
||||
List(opts v1.ListOptions) (*storage.CSIDriverList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSIDriver, err error)
|
||||
CSIDriverExpansion
|
||||
}
|
||||
|
||||
// cSIDrivers implements CSIDriverInterface
|
||||
type cSIDrivers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newCSIDrivers returns a CSIDrivers
|
||||
func newCSIDrivers(c *StorageClient) *cSIDrivers {
|
||||
return &cSIDrivers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any.
|
||||
func (c *cSIDrivers) Get(name string, options v1.GetOptions) (result *storage.CSIDriver, err error) {
|
||||
result = &storage.CSIDriver{}
|
||||
err = c.client.Get().
|
||||
Resource("csidrivers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors.
|
||||
func (c *cSIDrivers) List(opts v1.ListOptions) (result *storage.CSIDriverList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &storage.CSIDriverList{}
|
||||
err = c.client.Get().
|
||||
Resource("csidrivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cSIDrivers.
|
||||
func (c *cSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("csidrivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *cSIDrivers) Create(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) {
|
||||
result = &storage.CSIDriver{}
|
||||
err = c.client.Post().
|
||||
Resource("csidrivers").
|
||||
Body(cSIDriver).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *cSIDrivers) Update(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) {
|
||||
result = &storage.CSIDriver{}
|
||||
err = c.client.Put().
|
||||
Resource("csidrivers").
|
||||
Name(cSIDriver.Name).
|
||||
Body(cSIDriver).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs.
|
||||
func (c *cSIDrivers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("csidrivers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("csidrivers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSIDriver.
|
||||
func (c *cSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSIDriver, err error) {
|
||||
result = &storage.CSIDriver{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("csidrivers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
/*
|
||||
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 internalversion
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme"
|
||||
)
|
||||
|
||||
// CSINodesGetter has a method to return a CSINodeInterface.
|
||||
// A group's client should implement this interface.
|
||||
type CSINodesGetter interface {
|
||||
CSINodes() CSINodeInterface
|
||||
}
|
||||
|
||||
// CSINodeInterface has methods to work with CSINode resources.
|
||||
type CSINodeInterface interface {
|
||||
Create(*storage.CSINode) (*storage.CSINode, error)
|
||||
Update(*storage.CSINode) (*storage.CSINode, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*storage.CSINode, error)
|
||||
List(opts v1.ListOptions) (*storage.CSINodeList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSINode, err error)
|
||||
CSINodeExpansion
|
||||
}
|
||||
|
||||
// cSINodes implements CSINodeInterface
|
||||
type cSINodes struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newCSINodes returns a CSINodes
|
||||
func newCSINodes(c *StorageClient) *cSINodes {
|
||||
return &cSINodes{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any.
|
||||
func (c *cSINodes) Get(name string, options v1.GetOptions) (result *storage.CSINode, err error) {
|
||||
result = &storage.CSINode{}
|
||||
err = c.client.Get().
|
||||
Resource("csinodes").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSINodes that match those selectors.
|
||||
func (c *cSINodes) List(opts v1.ListOptions) (result *storage.CSINodeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &storage.CSINodeList{}
|
||||
err = c.client.Get().
|
||||
Resource("csinodes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cSINodes.
|
||||
func (c *cSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("csinodes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *cSINodes) Create(cSINode *storage.CSINode) (result *storage.CSINode, err error) {
|
||||
result = &storage.CSINode{}
|
||||
err = c.client.Post().
|
||||
Resource("csinodes").
|
||||
Body(cSINode).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *cSINodes) Update(cSINode *storage.CSINode) (result *storage.CSINode, err error) {
|
||||
result = &storage.CSINode{}
|
||||
err = c.client.Put().
|
||||
Resource("csinodes").
|
||||
Name(cSINode.Name).
|
||||
Body(cSINode).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the cSINode and deletes it. Returns an error if one occurs.
|
||||
func (c *cSINodes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("csinodes").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("csinodes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSINode.
|
||||
func (c *cSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSINode, err error) {
|
||||
result = &storage.CSINode{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("csinodes").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -9,6 +9,8 @@ go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"fake_csidriver.go",
|
||||
"fake_csinode.go",
|
||||
"fake_storage_client.go",
|
||||
"fake_storageclass.go",
|
||||
"fake_volumeattachment.go",
|
||||
|
@ -0,0 +1,120 @@
|
||||
/*
|
||||
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 (
|
||||
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"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
)
|
||||
|
||||
// FakeCSIDrivers implements CSIDriverInterface
|
||||
type FakeCSIDrivers struct {
|
||||
Fake *FakeStorage
|
||||
}
|
||||
|
||||
var csidriversResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "csidrivers"}
|
||||
|
||||
var csidriversKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "", Kind: "CSIDriver"}
|
||||
|
||||
// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any.
|
||||
func (c *FakeCSIDrivers) Get(name string, options v1.GetOptions) (result *storage.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(csidriversResource, name), &storage.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSIDriver), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors.
|
||||
func (c *FakeCSIDrivers) List(opts v1.ListOptions) (result *storage.CSIDriverList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(csidriversResource, csidriversKind, opts), &storage.CSIDriverList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &storage.CSIDriverList{ListMeta: obj.(*storage.CSIDriverList).ListMeta}
|
||||
for _, item := range obj.(*storage.CSIDriverList).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 cSIDrivers.
|
||||
func (c *FakeCSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(csidriversResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *FakeCSIDrivers) Create(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &storage.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSIDriver), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *FakeCSIDrivers) Update(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &storage.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSIDriver), err
|
||||
}
|
||||
|
||||
// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCSIDrivers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(csidriversResource, name), &storage.CSIDriver{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(csidriversResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &storage.CSIDriverList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSIDriver.
|
||||
func (c *FakeCSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &storage.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSIDriver), err
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
/*
|
||||
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 (
|
||||
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"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
)
|
||||
|
||||
// FakeCSINodes implements CSINodeInterface
|
||||
type FakeCSINodes struct {
|
||||
Fake *FakeStorage
|
||||
}
|
||||
|
||||
var csinodesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "csinodes"}
|
||||
|
||||
var csinodesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "", Kind: "CSINode"}
|
||||
|
||||
// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any.
|
||||
func (c *FakeCSINodes) Get(name string, options v1.GetOptions) (result *storage.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(csinodesResource, name), &storage.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSINode), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSINodes that match those selectors.
|
||||
func (c *FakeCSINodes) List(opts v1.ListOptions) (result *storage.CSINodeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(csinodesResource, csinodesKind, opts), &storage.CSINodeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &storage.CSINodeList{ListMeta: obj.(*storage.CSINodeList).ListMeta}
|
||||
for _, item := range obj.(*storage.CSINodeList).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 cSINodes.
|
||||
func (c *FakeCSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(csinodesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *FakeCSINodes) Create(cSINode *storage.CSINode) (result *storage.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &storage.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSINode), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *FakeCSINodes) Update(cSINode *storage.CSINode) (result *storage.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &storage.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSINode), err
|
||||
}
|
||||
|
||||
// Delete takes name of the cSINode and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCSINodes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(csinodesResource, name), &storage.CSINode{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(csinodesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &storage.CSINodeList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSINode.
|
||||
func (c *FakeCSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &storage.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*storage.CSINode), err
|
||||
}
|
@ -28,6 +28,14 @@ type FakeStorage struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeStorage) CSIDrivers() internalversion.CSIDriverInterface {
|
||||
return &FakeCSIDrivers{c}
|
||||
}
|
||||
|
||||
func (c *FakeStorage) CSINodes() internalversion.CSINodeInterface {
|
||||
return &FakeCSINodes{c}
|
||||
}
|
||||
|
||||
func (c *FakeStorage) StorageClasses() internalversion.StorageClassInterface {
|
||||
return &FakeStorageClasses{c}
|
||||
}
|
||||
|
@ -18,6 +18,10 @@ limitations under the License.
|
||||
|
||||
package internalversion
|
||||
|
||||
type CSIDriverExpansion interface{}
|
||||
|
||||
type CSINodeExpansion interface{}
|
||||
|
||||
type StorageClassExpansion interface{}
|
||||
|
||||
type VolumeAttachmentExpansion interface{}
|
||||
|
@ -25,6 +25,8 @@ import (
|
||||
|
||||
type StorageInterface interface {
|
||||
RESTClient() rest.Interface
|
||||
CSIDriversGetter
|
||||
CSINodesGetter
|
||||
StorageClassesGetter
|
||||
VolumeAttachmentsGetter
|
||||
}
|
||||
@ -34,6 +36,14 @@ type StorageClient struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *StorageClient) CSIDrivers() CSIDriverInterface {
|
||||
return newCSIDrivers(c)
|
||||
}
|
||||
|
||||
func (c *StorageClient) CSINodes() CSINodeInterface {
|
||||
return newCSINodes(c)
|
||||
}
|
||||
|
||||
func (c *StorageClient) StorageClasses() StorageClassInterface {
|
||||
return newStorageClasses(c)
|
||||
}
|
||||
|
1408
staging/src/k8s.io/api/storage/v1beta1/generated.pb.go
generated
1408
staging/src/k8s.io/api/storage/v1beta1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,141 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1beta1";
|
||||
|
||||
// CSIDriver captures information about a Container Storage Interface (CSI)
|
||||
// volume driver deployed on the cluster.
|
||||
// CSI drivers do not need to create the CSIDriver object directly. Instead they may use the
|
||||
// cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically
|
||||
// creates a CSIDriver object representing the driver.
|
||||
// Kubernetes attach detach controller uses this object to determine whether attach is required.
|
||||
// Kubelet uses this object to determine whether pod information needs to be passed on mount.
|
||||
// CSIDriver objects are non-namespaced.
|
||||
message CSIDriver {
|
||||
// Standard object metadata.
|
||||
// metadata.Name indicates the name of the CSI driver that this object
|
||||
// refers to; it MUST be the same name returned by the CSI GetPluginName()
|
||||
// call for that driver.
|
||||
// The driver name must be 63 characters or less, beginning and ending with
|
||||
// an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and
|
||||
// alphanumerics between.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Specification of the CSI Driver.
|
||||
optional CSIDriverSpec spec = 2;
|
||||
}
|
||||
|
||||
// CSIDriverList is a collection of CSIDriver objects.
|
||||
message CSIDriverList {
|
||||
// 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 CSIDriver
|
||||
repeated CSIDriver items = 2;
|
||||
}
|
||||
|
||||
// CSIDriverSpec is the specification of a CSIDriver.
|
||||
message CSIDriverSpec {
|
||||
// attachRequired indicates this CSI volume driver requires an attach
|
||||
// operation (because it implements the CSI ControllerPublishVolume()
|
||||
// method), and that the Kubernetes attach detach controller should call
|
||||
// the attach volume interface which checks the volumeattachment status
|
||||
// and waits until the volume is attached before proceeding to mounting.
|
||||
// The CSI external-attacher coordinates with CSI volume driver and updates
|
||||
// the volumeattachment status when the attach operation is complete.
|
||||
// If the CSIDriverRegistry feature gate is enabled and the value is
|
||||
// specified to false, the attach operation will be skipped.
|
||||
// Otherwise the attach operation will be called.
|
||||
// +optional
|
||||
optional bool attachRequired = 1;
|
||||
|
||||
// If set to true, podInfoOnMount indicates this CSI volume driver
|
||||
// requires additional pod information (like podName, podUID, etc.) during
|
||||
// mount operations.
|
||||
// If not set or set to false, pod information will not be passed on mount.
|
||||
// The CSI driver specifies podInfoOnMount as part of driver deployment.
|
||||
// If true, Kubelet will pass pod information as VolumeContext in the CSI
|
||||
// NodePublishVolume() calls.
|
||||
// The CSI driver is responsible for parsing and validating the information
|
||||
// passed in as VolumeContext.
|
||||
// The following VolumeConext will be passed if podInfoOnMount is set to true:
|
||||
// "csi.storage.k8s.io/pod.name": pod.Name
|
||||
// "csi.storage.k8s.io/pod.namespace": pod.Namespace
|
||||
// "csi.storage.k8s.io/pod.uid": string(pod.UID)
|
||||
// +optional
|
||||
optional bool podInfoOnMount = 2;
|
||||
}
|
||||
|
||||
// CSINode holds information about all CSI drivers installed on a node.
|
||||
// CSI drivers do not need to create the CSINode object directly. As long as
|
||||
// they use the node-driver-registrar sidecar container, the kubelet will
|
||||
// automatically populate the CSINode object for the CSI driver as part of
|
||||
// kubelet plugin registration.
|
||||
// CSINode has the same name as a node. If the object is missing, it means either
|
||||
// there are no CSI Drivers available on the node, or the Kubelet version is low
|
||||
// enough that it doesn't create this object.
|
||||
// CSINode has an OwnerReference that points to the corresponding node object.
|
||||
message CSINode {
|
||||
// metadata.name must be the Kubernetes node name.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// spec is the specification of CSINode
|
||||
optional CSINodeSpec spec = 2;
|
||||
}
|
||||
|
||||
// CSINodeDriver holds information about the specification of one CSI driver installed on a node
|
||||
message CSINodeDriver {
|
||||
// This is the name of the CSI driver that this object refers to.
|
||||
// This MUST be the same name returned by the CSI GetPluginName() call for
|
||||
// that driver.
|
||||
optional string name = 1;
|
||||
|
||||
// nodeID of the node from the driver point of view.
|
||||
// This field enables Kubernetes to communicate with storage systems that do
|
||||
// not share the same nomenclature for nodes. For example, Kubernetes may
|
||||
// refer to a given node as "node1", but the storage system may refer to
|
||||
// the same node as "nodeA". When Kubernetes issues a command to the storage
|
||||
// system to attach a volume to a specific node, it can use this field to
|
||||
// refer to the node name using the ID that the storage system will
|
||||
// understand, e.g. "nodeA" instead of "node1". This field is required.
|
||||
optional string nodeID = 2;
|
||||
|
||||
// topologyKeys is the list of keys supported by the driver.
|
||||
// When a driver is initialized on a cluster, it provides a set of topology
|
||||
// keys that it understands (e.g. "company.com/zone", "company.com/region").
|
||||
// When a driver is initialized on a node, it provides the same topology keys
|
||||
// along with values. Kubelet will expose these topology keys as labels
|
||||
// on its own node object.
|
||||
// When Kubernetes does topology aware provisioning, it can use this list to
|
||||
// determine which labels it should retrieve from the node object and pass
|
||||
// back to the driver.
|
||||
// It is possible for different nodes to use different topology keys.
|
||||
// This can be empty if driver does not support topology.
|
||||
// +optional
|
||||
repeated string topologyKeys = 3;
|
||||
}
|
||||
|
||||
// CSINodeList is a collection of CSINode objects.
|
||||
message CSINodeList {
|
||||
// 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 CSINode
|
||||
repeated CSINode items = 2;
|
||||
}
|
||||
|
||||
// CSINodeSpec holds information about the specification of all CSI drivers installed on a node
|
||||
message CSINodeSpec {
|
||||
// drivers is a list of information of all CSI Drivers existing on a node.
|
||||
// It can be empty on initialization.
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
repeated CSINodeDriver drivers = 1;
|
||||
}
|
||||
|
||||
// StorageClass describes the parameters for a class of storage for
|
||||
// which PersistentVolumes can be dynamically provisioned.
|
||||
//
|
||||
|
@ -27,6 +27,76 @@ package v1beta1
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_CSIDriver = map[string]string{
|
||||
"": "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.",
|
||||
"metadata": "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"spec": "Specification of the CSI Driver.",
|
||||
}
|
||||
|
||||
func (CSIDriver) SwaggerDoc() map[string]string {
|
||||
return map_CSIDriver
|
||||
}
|
||||
|
||||
var map_CSIDriverList = map[string]string{
|
||||
"": "CSIDriverList is a collection of CSIDriver objects.",
|
||||
"metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "items is the list of CSIDriver",
|
||||
}
|
||||
|
||||
func (CSIDriverList) SwaggerDoc() map[string]string {
|
||||
return map_CSIDriverList
|
||||
}
|
||||
|
||||
var map_CSIDriverSpec = map[string]string{
|
||||
"": "CSIDriverSpec is the specification of a CSIDriver.",
|
||||
"attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.",
|
||||
"podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If not set or set to false, pod information will not be passed on mount. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true: \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID)",
|
||||
}
|
||||
|
||||
func (CSIDriverSpec) SwaggerDoc() map[string]string {
|
||||
return map_CSIDriverSpec
|
||||
}
|
||||
|
||||
var map_CSINode = map[string]string{
|
||||
"": "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.",
|
||||
"metadata": "metadata.name must be the Kubernetes node name.",
|
||||
"spec": "spec is the specification of CSINode",
|
||||
}
|
||||
|
||||
func (CSINode) SwaggerDoc() map[string]string {
|
||||
return map_CSINode
|
||||
}
|
||||
|
||||
var map_CSINodeDriver = map[string]string{
|
||||
"": "CSINodeDriver holds information about the specification of one CSI driver installed on a node",
|
||||
"name": "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.",
|
||||
"nodeID": "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.",
|
||||
"topologyKeys": "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.",
|
||||
}
|
||||
|
||||
func (CSINodeDriver) SwaggerDoc() map[string]string {
|
||||
return map_CSINodeDriver
|
||||
}
|
||||
|
||||
var map_CSINodeList = map[string]string{
|
||||
"": "CSINodeList is a collection of CSINode objects.",
|
||||
"metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "items is the list of CSINode",
|
||||
}
|
||||
|
||||
func (CSINodeList) SwaggerDoc() map[string]string {
|
||||
return map_CSINodeList
|
||||
}
|
||||
|
||||
var map_CSINodeSpec = map[string]string{
|
||||
"": "CSINodeSpec holds information about the specification of all CSI drivers installed on a node",
|
||||
"drivers": "drivers is a list of information of all CSI Drivers existing on a node. It can be empty on initialization.",
|
||||
}
|
||||
|
||||
func (CSINodeSpec) SwaggerDoc() map[string]string {
|
||||
return map_CSINodeSpec
|
||||
}
|
||||
|
||||
var map_StorageClass = map[string]string{
|
||||
"": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
|
@ -25,6 +25,196 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CSIDriver) DeepCopyInto(out *CSIDriver) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriver.
|
||||
func (in *CSIDriver) DeepCopy() *CSIDriver {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSIDriver)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSIDriver) 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 *CSIDriverList) DeepCopyInto(out *CSIDriverList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]CSIDriver, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverList.
|
||||
func (in *CSIDriverList) DeepCopy() *CSIDriverList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSIDriverList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSIDriverList) 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 *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) {
|
||||
*out = *in
|
||||
if in.AttachRequired != nil {
|
||||
in, out := &in.AttachRequired, &out.AttachRequired
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.PodInfoOnMount != nil {
|
||||
in, out := &in.PodInfoOnMount, &out.PodInfoOnMount
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverSpec.
|
||||
func (in *CSIDriverSpec) DeepCopy() *CSIDriverSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSIDriverSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CSINode) DeepCopyInto(out *CSINode) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINode.
|
||||
func (in *CSINode) DeepCopy() *CSINode {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINode)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSINode) 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 *CSINodeDriver) DeepCopyInto(out *CSINodeDriver) {
|
||||
*out = *in
|
||||
if in.TopologyKeys != nil {
|
||||
in, out := &in.TopologyKeys, &out.TopologyKeys
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINodeDriver.
|
||||
func (in *CSINodeDriver) DeepCopy() *CSINodeDriver {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINodeDriver)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CSINodeList) DeepCopyInto(out *CSINodeList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]CSINode, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINodeList.
|
||||
func (in *CSINodeList) DeepCopy() *CSINodeList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINodeList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *CSINodeList) 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 *CSINodeSpec) DeepCopyInto(out *CSINodeSpec) {
|
||||
*out = *in
|
||||
if in.Drivers != nil {
|
||||
in, out := &in.Drivers, &out.Drivers
|
||||
*out = make([]CSINodeDriver, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINodeSpec.
|
||||
func (in *CSINodeSpec) DeepCopy() *CSINodeSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CSINodeSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *StorageClass) DeepCopyInto(out *StorageClass) {
|
||||
*out = *in
|
||||
|
@ -280,6 +280,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().VolumeAttachments().Informer()}, nil
|
||||
|
||||
// Group=storage.k8s.io, Version=v1beta1
|
||||
case storagev1beta1.SchemeGroupVersion.WithResource("csidrivers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().CSIDrivers().Informer()}, nil
|
||||
case storagev1beta1.SchemeGroupVersion.WithResource("csinodes"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().CSINodes().Informer()}, nil
|
||||
case storagev1beta1.SchemeGroupVersion.WithResource("storageclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
|
||||
case storagev1beta1.SchemeGroupVersion.WithResource("volumeattachments"):
|
||||
|
@ -8,6 +8,8 @@ load(
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"csidriver.go",
|
||||
"csinode.go",
|
||||
"interface.go",
|
||||
"storageclass.go",
|
||||
"volumeattachment.go",
|
||||
|
@ -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 v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
v1 "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"
|
||||
v1beta1 "k8s.io/client-go/listers/storage/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CSIDriverInformer provides access to a shared informer and lister for
|
||||
// CSIDrivers.
|
||||
type CSIDriverInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.CSIDriverLister
|
||||
}
|
||||
|
||||
type cSIDriverInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewCSIDriverInformer constructs a new informer for CSIDriver 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 NewCSIDriverInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredCSIDriverInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredCSIDriverInformer constructs a new informer for CSIDriver 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 NewFilteredCSIDriverInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1beta1().CSIDrivers().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1beta1().CSIDrivers().Watch(options)
|
||||
},
|
||||
},
|
||||
&storagev1beta1.CSIDriver{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *cSIDriverInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredCSIDriverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *cSIDriverInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&storagev1beta1.CSIDriver{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *cSIDriverInformer) Lister() v1beta1.CSIDriverLister {
|
||||
return v1beta1.NewCSIDriverLister(f.Informer().GetIndexer())
|
||||
}
|
@ -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 v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
v1 "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"
|
||||
v1beta1 "k8s.io/client-go/listers/storage/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CSINodeInformer provides access to a shared informer and lister for
|
||||
// CSINodes.
|
||||
type CSINodeInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.CSINodeLister
|
||||
}
|
||||
|
||||
type cSINodeInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewCSINodeInformer constructs a new informer for CSINode 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 NewCSINodeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredCSINodeInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredCSINodeInformer constructs a new informer for CSINode 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 NewFilteredCSINodeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1beta1().CSINodes().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1beta1().CSINodes().Watch(options)
|
||||
},
|
||||
},
|
||||
&storagev1beta1.CSINode{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *cSINodeInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredCSINodeInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *cSINodeInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&storagev1beta1.CSINode{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *cSINodeInformer) Lister() v1beta1.CSINodeLister {
|
||||
return v1beta1.NewCSINodeLister(f.Informer().GetIndexer())
|
||||
}
|
@ -24,6 +24,10 @@ import (
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// CSIDrivers returns a CSIDriverInformer.
|
||||
CSIDrivers() CSIDriverInformer
|
||||
// CSINodes returns a CSINodeInformer.
|
||||
CSINodes() CSINodeInformer
|
||||
// StorageClasses returns a StorageClassInformer.
|
||||
StorageClasses() StorageClassInformer
|
||||
// VolumeAttachments returns a VolumeAttachmentInformer.
|
||||
@ -41,6 +45,16 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// CSIDrivers returns a CSIDriverInformer.
|
||||
func (v *version) CSIDrivers() CSIDriverInformer {
|
||||
return &cSIDriverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// CSINodes returns a CSINodeInformer.
|
||||
func (v *version) CSINodes() CSINodeInformer {
|
||||
return &cSINodeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// StorageClasses returns a StorageClassInformer.
|
||||
func (v *version) StorageClasses() StorageClassInformer {
|
||||
return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
|
@ -8,6 +8,8 @@ load(
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"csidriver.go",
|
||||
"csinode.go",
|
||||
"doc.go",
|
||||
"generated_expansion.go",
|
||||
"storage_client.go",
|
||||
|
@ -0,0 +1,164 @@
|
||||
/*
|
||||
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 v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
v1 "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"
|
||||
)
|
||||
|
||||
// CSIDriversGetter has a method to return a CSIDriverInterface.
|
||||
// A group's client should implement this interface.
|
||||
type CSIDriversGetter interface {
|
||||
CSIDrivers() CSIDriverInterface
|
||||
}
|
||||
|
||||
// CSIDriverInterface has methods to work with CSIDriver resources.
|
||||
type CSIDriverInterface interface {
|
||||
Create(*v1beta1.CSIDriver) (*v1beta1.CSIDriver, error)
|
||||
Update(*v1beta1.CSIDriver) (*v1beta1.CSIDriver, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.CSIDriver, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.CSIDriverList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error)
|
||||
CSIDriverExpansion
|
||||
}
|
||||
|
||||
// cSIDrivers implements CSIDriverInterface
|
||||
type cSIDrivers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newCSIDrivers returns a CSIDrivers
|
||||
func newCSIDrivers(c *StorageV1beta1Client) *cSIDrivers {
|
||||
return &cSIDrivers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any.
|
||||
func (c *cSIDrivers) Get(name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) {
|
||||
result = &v1beta1.CSIDriver{}
|
||||
err = c.client.Get().
|
||||
Resource("csidrivers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors.
|
||||
func (c *cSIDrivers) List(opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.CSIDriverList{}
|
||||
err = c.client.Get().
|
||||
Resource("csidrivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cSIDrivers.
|
||||
func (c *cSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("csidrivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *cSIDrivers) Create(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) {
|
||||
result = &v1beta1.CSIDriver{}
|
||||
err = c.client.Post().
|
||||
Resource("csidrivers").
|
||||
Body(cSIDriver).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *cSIDrivers) Update(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) {
|
||||
result = &v1beta1.CSIDriver{}
|
||||
err = c.client.Put().
|
||||
Resource("csidrivers").
|
||||
Name(cSIDriver.Name).
|
||||
Body(cSIDriver).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs.
|
||||
func (c *cSIDrivers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("csidrivers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("csidrivers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSIDriver.
|
||||
func (c *cSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) {
|
||||
result = &v1beta1.CSIDriver{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("csidrivers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
/*
|
||||
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 v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
v1 "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"
|
||||
)
|
||||
|
||||
// CSINodesGetter has a method to return a CSINodeInterface.
|
||||
// A group's client should implement this interface.
|
||||
type CSINodesGetter interface {
|
||||
CSINodes() CSINodeInterface
|
||||
}
|
||||
|
||||
// CSINodeInterface has methods to work with CSINode resources.
|
||||
type CSINodeInterface interface {
|
||||
Create(*v1beta1.CSINode) (*v1beta1.CSINode, error)
|
||||
Update(*v1beta1.CSINode) (*v1beta1.CSINode, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.CSINode, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.CSINodeList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error)
|
||||
CSINodeExpansion
|
||||
}
|
||||
|
||||
// cSINodes implements CSINodeInterface
|
||||
type cSINodes struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newCSINodes returns a CSINodes
|
||||
func newCSINodes(c *StorageV1beta1Client) *cSINodes {
|
||||
return &cSINodes{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any.
|
||||
func (c *cSINodes) Get(name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) {
|
||||
result = &v1beta1.CSINode{}
|
||||
err = c.client.Get().
|
||||
Resource("csinodes").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSINodes that match those selectors.
|
||||
func (c *cSINodes) List(opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.CSINodeList{}
|
||||
err = c.client.Get().
|
||||
Resource("csinodes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cSINodes.
|
||||
func (c *cSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("csinodes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *cSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) {
|
||||
result = &v1beta1.CSINode{}
|
||||
err = c.client.Post().
|
||||
Resource("csinodes").
|
||||
Body(cSINode).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *cSINodes) Update(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) {
|
||||
result = &v1beta1.CSINode{}
|
||||
err = c.client.Put().
|
||||
Resource("csinodes").
|
||||
Name(cSINode.Name).
|
||||
Body(cSINode).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the cSINode and deletes it. Returns an error if one occurs.
|
||||
func (c *cSINodes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("csinodes").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("csinodes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSINode.
|
||||
func (c *cSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) {
|
||||
result = &v1beta1.CSINode{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("csinodes").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -9,6 +9,8 @@ go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"fake_csidriver.go",
|
||||
"fake_csinode.go",
|
||||
"fake_storage_client.go",
|
||||
"fake_storageclass.go",
|
||||
"fake_volumeattachment.go",
|
||||
|
@ -0,0 +1,120 @@
|
||||
/*
|
||||
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 (
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
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"
|
||||
)
|
||||
|
||||
// FakeCSIDrivers implements CSIDriverInterface
|
||||
type FakeCSIDrivers struct {
|
||||
Fake *FakeStorageV1beta1
|
||||
}
|
||||
|
||||
var csidriversResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "csidrivers"}
|
||||
|
||||
var csidriversKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "CSIDriver"}
|
||||
|
||||
// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any.
|
||||
func (c *FakeCSIDrivers) Get(name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(csidriversResource, name), &v1beta1.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSIDriver), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors.
|
||||
func (c *FakeCSIDrivers) List(opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(csidriversResource, csidriversKind, opts), &v1beta1.CSIDriverList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.CSIDriverList{ListMeta: obj.(*v1beta1.CSIDriverList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.CSIDriverList).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 cSIDrivers.
|
||||
func (c *FakeCSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(csidriversResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *FakeCSIDrivers) Create(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSIDriver), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any.
|
||||
func (c *FakeCSIDrivers) Update(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSIDriver), err
|
||||
}
|
||||
|
||||
// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCSIDrivers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(csidriversResource, name), &v1beta1.CSIDriver{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(csidriversResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.CSIDriverList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSIDriver.
|
||||
func (c *FakeCSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &v1beta1.CSIDriver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSIDriver), err
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
/*
|
||||
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 (
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
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"
|
||||
)
|
||||
|
||||
// FakeCSINodes implements CSINodeInterface
|
||||
type FakeCSINodes struct {
|
||||
Fake *FakeStorageV1beta1
|
||||
}
|
||||
|
||||
var csinodesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "csinodes"}
|
||||
|
||||
var csinodesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "CSINode"}
|
||||
|
||||
// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any.
|
||||
func (c *FakeCSINodes) Get(name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(csinodesResource, name), &v1beta1.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSINode), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CSINodes that match those selectors.
|
||||
func (c *FakeCSINodes) List(opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(csinodesResource, csinodesKind, opts), &v1beta1.CSINodeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.CSINodeList{ListMeta: obj.(*v1beta1.CSINodeList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.CSINodeList).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 cSINodes.
|
||||
func (c *FakeCSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(csinodesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *FakeCSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &v1beta1.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSINode), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any.
|
||||
func (c *FakeCSINodes) Update(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &v1beta1.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSINode), err
|
||||
}
|
||||
|
||||
// Delete takes name of the cSINode and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCSINodes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(csinodesResource, name), &v1beta1.CSINode{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(csinodesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.CSINodeList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cSINode.
|
||||
func (c *FakeCSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &v1beta1.CSINode{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.CSINode), err
|
||||
}
|
@ -28,6 +28,14 @@ type FakeStorageV1beta1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeStorageV1beta1) CSIDrivers() v1beta1.CSIDriverInterface {
|
||||
return &FakeCSIDrivers{c}
|
||||
}
|
||||
|
||||
func (c *FakeStorageV1beta1) CSINodes() v1beta1.CSINodeInterface {
|
||||
return &FakeCSINodes{c}
|
||||
}
|
||||
|
||||
func (c *FakeStorageV1beta1) StorageClasses() v1beta1.StorageClassInterface {
|
||||
return &FakeStorageClasses{c}
|
||||
}
|
||||
|
@ -18,6 +18,10 @@ limitations under the License.
|
||||
|
||||
package v1beta1
|
||||
|
||||
type CSIDriverExpansion interface{}
|
||||
|
||||
type CSINodeExpansion interface{}
|
||||
|
||||
type StorageClassExpansion interface{}
|
||||
|
||||
type VolumeAttachmentExpansion interface{}
|
||||
|
@ -27,6 +27,8 @@ import (
|
||||
|
||||
type StorageV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
CSIDriversGetter
|
||||
CSINodesGetter
|
||||
StorageClassesGetter
|
||||
VolumeAttachmentsGetter
|
||||
}
|
||||
@ -36,6 +38,14 @@ type StorageV1beta1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *StorageV1beta1Client) CSIDrivers() CSIDriverInterface {
|
||||
return newCSIDrivers(c)
|
||||
}
|
||||
|
||||
func (c *StorageV1beta1Client) CSINodes() CSINodeInterface {
|
||||
return newCSINodes(c)
|
||||
}
|
||||
|
||||
func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface {
|
||||
return newStorageClasses(c)
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ load(
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"csidriver.go",
|
||||
"csinode.go",
|
||||
"expansion_generated.go",
|
||||
"storageclass.go",
|
||||
"volumeattachment.go",
|
||||
|
@ -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 v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CSIDriverLister helps list CSIDrivers.
|
||||
type CSIDriverLister interface {
|
||||
// List lists all CSIDrivers in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1beta1.CSIDriver, err error)
|
||||
// Get retrieves the CSIDriver from the index for a given name.
|
||||
Get(name string) (*v1beta1.CSIDriver, error)
|
||||
CSIDriverListerExpansion
|
||||
}
|
||||
|
||||
// cSIDriverLister implements the CSIDriverLister interface.
|
||||
type cSIDriverLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewCSIDriverLister returns a new CSIDriverLister.
|
||||
func NewCSIDriverLister(indexer cache.Indexer) CSIDriverLister {
|
||||
return &cSIDriverLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all CSIDrivers in the indexer.
|
||||
func (s *cSIDriverLister) List(selector labels.Selector) (ret []*v1beta1.CSIDriver, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1beta1.CSIDriver))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the CSIDriver from the index for a given name.
|
||||
func (s *cSIDriverLister) Get(name string) (*v1beta1.CSIDriver, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("csidriver"), name)
|
||||
}
|
||||
return obj.(*v1beta1.CSIDriver), nil
|
||||
}
|
@ -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 v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CSINodeLister helps list CSINodes.
|
||||
type CSINodeLister interface {
|
||||
// List lists all CSINodes in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1beta1.CSINode, err error)
|
||||
// Get retrieves the CSINode from the index for a given name.
|
||||
Get(name string) (*v1beta1.CSINode, error)
|
||||
CSINodeListerExpansion
|
||||
}
|
||||
|
||||
// cSINodeLister implements the CSINodeLister interface.
|
||||
type cSINodeLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewCSINodeLister returns a new CSINodeLister.
|
||||
func NewCSINodeLister(indexer cache.Indexer) CSINodeLister {
|
||||
return &cSINodeLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all CSINodes in the indexer.
|
||||
func (s *cSINodeLister) List(selector labels.Selector) (ret []*v1beta1.CSINode, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1beta1.CSINode))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the CSINode from the index for a given name.
|
||||
func (s *cSINodeLister) Get(name string) (*v1beta1.CSINode, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("csinode"), name)
|
||||
}
|
||||
return obj.(*v1beta1.CSINode), nil
|
||||
}
|
@ -18,6 +18,14 @@ limitations under the License.
|
||||
|
||||
package v1beta1
|
||||
|
||||
// CSIDriverListerExpansion allows custom methods to be added to
|
||||
// CSIDriverLister.
|
||||
type CSIDriverListerExpansion interface{}
|
||||
|
||||
// CSINodeListerExpansion allows custom methods to be added to
|
||||
// CSINodeLister.
|
||||
type CSINodeListerExpansion interface{}
|
||||
|
||||
// StorageClassListerExpansion allows custom methods to be added to
|
||||
// StorageClassLister.
|
||||
type StorageClassListerExpansion interface{}
|
||||
|
Loading…
Reference in New Issue
Block a user