diff --git a/apis/objectstorage/v1alpha2/doc.go b/apis/objectstorage/v1alpha2/doc.go new file mode 100644 index 00000000..3dc308c4 --- /dev/null +++ b/apis/objectstorage/v1alpha2/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2020 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. +*/ + +// +k8s:deepcopy-gen=package,register +// +groupName=objectstorage.k8s.io +// +k8s:protobuf-gen=package +// +k8s:openapi-gen=true +// +kubebuilder:validation:Required + +package v1alpha2 diff --git a/apis/objectstorage/v1alpha2/register.go b/apis/objectstorage/v1alpha2/register.go new file mode 100644 index 00000000..835a721b --- /dev/null +++ b/apis/objectstorage/v1alpha2/register.go @@ -0,0 +1,39 @@ +/* +Copyright 2020 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. +*/ + +package v1alpha2 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + objectstorage "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: objectstorage.GroupName, Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/apis/objectstorage/v1alpha2/types.go b/apis/objectstorage/v1alpha2/types.go new file mode 100644 index 00000000..bea94179 --- /dev/null +++ b/apis/objectstorage/v1alpha2/types.go @@ -0,0 +1,336 @@ +/* +Copyright 2020 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. +*/ + +package v1alpha2 + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func init() { + SchemeBuilder.Register(&Bucket{}, &BucketList{}) + SchemeBuilder.Register(&BucketClaim{}, &BucketClaimList{}) + SchemeBuilder.Register(&BucketClass{}, &BucketClassList{}) + + SchemeBuilder.Register(&BucketAccess{}, &BucketAccessList{}) + SchemeBuilder.Register(&BucketAccessClass{}, &BucketAccessClassList{}) +} + +type DeletionPolicy string + +const ( + DeletionPolicyRetain DeletionPolicy = "Retain" + DeletionPolicyDelete DeletionPolicy = "Delete" +) + +type Protocol string + +const ( + ProtocolS3 Protocol = "S3" + ProtocolAzure Protocol = "Azure" + ProtocolGCP Protocol = "GCP" +) + +type AuthenticationType string + +const ( + AuthenticationTypeKey AuthenticationType = "Key" + AuthenticationTypeIAM AuthenticationType = "IAM" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Cluster +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +type Bucket struct { + metav1.TypeMeta `json:",inline"` + + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BucketSpec `json:"spec,omitempty"` + + // +optional + Status BucketStatus `json:"status,omitempty"` +} + +type BucketSpec struct { + // DriverName is the name of driver associated with this bucket + DriverName string `json:"driverName"` + + // Name of the BucketClass specified in the BucketRequest + BucketClassName string `json:"bucketClassName"` + + // Name of the BucketClaim that resulted in the creation of this Bucket + // In case the Bucket object was created manually, then this should refer + // to the BucketClaim with which this Bucket should be bound + BucketClaim *corev1.ObjectReference `json:"bucketClaim"` + + // Protocols are the set of data APIs this bucket is expected to support. + // The possible values for protocol are: + // - S3: Indicates Amazon S3 protocol + // - Azure: Indicates Microsoft Azure BlobStore protocol + // - GCS: Indicates Google Cloud Storage protocol + Protocols []Protocol `json:"protocols"` + + // +optional + Parameters map[string]string `json:"parameters,omitempty"` + + // DeletionPolicy is used to specify how COSI should handle deletion of this + // bucket. There are 2 possible values: + // - Retain: Indicates that the bucket should not be deleted from the OSP (default) + // - Delete: Indicates that the bucket should be deleted from the OSP + // once all the workloads accessing this bucket are done + // +optional + // +kubebuilder:default:=Retain + DeletionPolicy DeletionPolicy `json:"deletionPolicy"` + + // ExistingBucketID is the unique id of the bucket in the OSP. This field should be + // used to specify a bucket that has been created outside of COSI. + // This field will be empty when the Bucket is dynamically provisioned by COSI. + // +optional + ExistingBucketID string `json:"existingBucketID,omitempty"` +} + +type BucketStatus struct { + // BucketReady is a boolean condition to reflect the successful creation + // of a bucket. + BucketReady bool `json:"bucketReady,omitempty"` + + // BucketID is the unique id of the bucket in the OSP. This field will be + // populated by COSI. + // +optional + BucketID string `json:"bucketID,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type BucketList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Bucket `json:"items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Namespaced +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +type BucketClaim struct { + metav1.TypeMeta `json:",inline"` + + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BucketClaimSpec `json:"spec,omitempty"` + + // +optional + Status BucketClaimStatus `json:"status,omitempty"` +} + +type BucketClaimSpec struct { + // Name of the BucketClass + BucketClassName string `json:"bucketClassName,omitempty"` + + // Protocols are the set of data API this bucket is required to support. + // The possible values for protocol are: + // - S3: Indicates Amazon S3 protocol + // - Azure: Indicates Microsoft Azure BlobStore protocol + // - GCS: Indicates Google Cloud Storage protocol + Protocols []Protocol `json:"protocols"` + + // Name of a bucket object that was manually + // created to import a bucket created outside of COSI + // If unspecified, then a new Bucket will be dynamically provisioned + // +optional + ExistingBucketName string `json:"existingBucketName,omitempty"` +} + +type BucketClaimStatus struct { + // BucketReady indicates that the bucket is ready for consumpotion + // by workloads + BucketReady bool `json:"bucketReady"` + + // BucketName is the name of the provisioned Bucket in response + // to this BucketClaim. It is generated and set by the COSI controller + // before making the creation request to the OSP backend. + // +optional + BucketName string `json:"bucketName,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type BucketClaimList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BucketClaim `json:"items"` +} + +// +genclient +// +genclient:nonNamespaced +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Cluster +// +kubebuilder:storageversion +type BucketClass struct { + metav1.TypeMeta `json:",inline"` + + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // DriverName is the name of driver associated with this bucket + DriverName string `json:"driverName"` + + // DeletionPolicy is used to specify how COSI should handle deletion of this + // bucket. There are 2 possible values: + // - Retain: Indicates that the bucket should not be deleted from the OSP + // - Delete: Indicates that the bucket should be deleted from the OSP + // once all the workloads accessing this bucket are done + // +kubebuilder:default:=Retain + DeletionPolicy DeletionPolicy `json:"deletionPolicy"` + + // Quotas defines optional quotas applied to all buckets created from this Bucket Class. + // +optional + Quotas BucketQuotas `json:"quotas,omitempty"` + + // Parameters is an opaque map for passing in configuration to a driver + // for creating the bucket + // +optional + Parameters map[string]string `json:"parameters,omitempty"` +} + +type BucketQuotas struct { + // MaxObjects specifies the maximum number of objects that will be allowed in a bucket. + // +optional + // +nullable + MaxObjects *uint64 `json:"maxObjects"` + + // MaxSize specifies the maximum allowed size counting all objects in the bucket. This parameter + // should not be assumed to be a hard limit. Most object storage providers are only able to + // check the total size of a bucket periodically, and high-bandwidth bucket writes may allow the + // total size to surpass the limit by some margin. + // +optional + // +nullable + MaxSize *resource.Quantity `json:"maxSize"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type BucketClassList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BucketClass `json:"items"` +} + +// +genclient +// +genclient:nonNamespaced +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Cluster +// +kubebuilder:storageversion +type BucketAccessClass struct { + metav1.TypeMeta `json:",inline"` + + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // DriverName is the name of driver associated with + // this BucketAccess + DriverName string `json:"driverName"` + + // AuthenticationType denotes the style of authentication + // It can be one of + // Key - access, secret tokens based authentication + // IAM - implicit authentication of pods to the OSP based on service account mappings + AuthenticationType AuthenticationType `json:"authenticationType"` + + // Parameters is an opaque map for passing in configuration to a driver + // for granting access to a bucket + // +optional + Parameters map[string]string `json:"parameters,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type BucketAccessClassList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BucketAccessClass `json:"items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Namespaced +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +type BucketAccess struct { + metav1.TypeMeta `json:",inline"` + + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BucketAccessSpec `json:"spec,omitempty"` + + // +optional + Status BucketAccessStatus `json:"status"` +} + +type BucketAccessSpec struct { + // BucketClaimName is the name of the BucketClaim. + BucketClaimName string `json:"bucketClaimName"` + + // Protocol is the name of the Protocol + // that this access credential is supposed to support + // If left empty, it will choose the protocol supported + // by the bucket. If the bucket supports multiple protocols, + // the end protocol is determined by the driver. + // +optional + Protocol Protocol `json:"protocol,omitempty"` + + // BucketAccessClassName is the name of the BucketAccessClass + BucketAccessClassName string `json:"bucketAccessClassName"` + + // CredentialsSecretName is the name of the secret that COSI should populate + // with the credentials. If a secret by this name already exists, then it is + // assumed that credentials have already been generated. It is not overridden. + // This secret is deleted when the BucketAccess is delted. + CredentialsSecretName string `json:"credentialsSecretName"` + + // ServiceAccountName is the name of the serviceAccount that COSI will map + // to the OSP service account when IAM styled authentication is specified + // +optional + ServiceAccountName string `json:"serviceAccountName,omitempty"` +} + +type BucketAccessStatus struct { + // AccountID is the unique ID for the account in the OSP. It will be populated + // by the COSI sidecar once access has been successfully granted. + // +optional + AccountID string `json:"accountID,omitempty"` + + // AccessGranted indicates the successful grant of privileges to access the bucket + // +optional + AccessGranted bool `json:"accessGranted"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type BucketAccessList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BucketAccess `json:"items"` +} diff --git a/apis/objectstorage/v1alpha2/zz_generated.deepcopy.go b/apis/objectstorage/v1alpha2/zz_generated.deepcopy.go new file mode 100644 index 00000000..5c0fef64 --- /dev/null +++ b/apis/objectstorage/v1alpha2/zz_generated.deepcopy.go @@ -0,0 +1,460 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 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 deepcopy-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1 "k8s.io/api/core/v1" + 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 *Bucket) DeepCopyInto(out *Bucket) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bucket. +func (in *Bucket) DeepCopy() *Bucket { + if in == nil { + return nil + } + out := new(Bucket) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Bucket) 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 *BucketAccess) DeepCopyInto(out *BucketAccess) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccess. +func (in *BucketAccess) DeepCopy() *BucketAccess { + if in == nil { + return nil + } + out := new(BucketAccess) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketAccess) 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 *BucketAccessClass) DeepCopyInto(out *BucketAccessClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessClass. +func (in *BucketAccessClass) DeepCopy() *BucketAccessClass { + if in == nil { + return nil + } + out := new(BucketAccessClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketAccessClass) 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 *BucketAccessClassList) DeepCopyInto(out *BucketAccessClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BucketAccessClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessClassList. +func (in *BucketAccessClassList) DeepCopy() *BucketAccessClassList { + if in == nil { + return nil + } + out := new(BucketAccessClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketAccessClassList) 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 *BucketAccessList) DeepCopyInto(out *BucketAccessList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BucketAccess, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessList. +func (in *BucketAccessList) DeepCopy() *BucketAccessList { + if in == nil { + return nil + } + out := new(BucketAccessList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketAccessList) 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 *BucketAccessSpec) DeepCopyInto(out *BucketAccessSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessSpec. +func (in *BucketAccessSpec) DeepCopy() *BucketAccessSpec { + if in == nil { + return nil + } + out := new(BucketAccessSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BucketAccessStatus) DeepCopyInto(out *BucketAccessStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccessStatus. +func (in *BucketAccessStatus) DeepCopy() *BucketAccessStatus { + if in == nil { + return nil + } + out := new(BucketAccessStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BucketClaim) DeepCopyInto(out *BucketClaim) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketClaim. +func (in *BucketClaim) DeepCopy() *BucketClaim { + if in == nil { + return nil + } + out := new(BucketClaim) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketClaim) 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 *BucketClaimList) DeepCopyInto(out *BucketClaimList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BucketClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketClaimList. +func (in *BucketClaimList) DeepCopy() *BucketClaimList { + if in == nil { + return nil + } + out := new(BucketClaimList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketClaimList) 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 *BucketClaimSpec) DeepCopyInto(out *BucketClaimSpec) { + *out = *in + if in.Protocols != nil { + in, out := &in.Protocols, &out.Protocols + *out = make([]Protocol, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketClaimSpec. +func (in *BucketClaimSpec) DeepCopy() *BucketClaimSpec { + if in == nil { + return nil + } + out := new(BucketClaimSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BucketClaimStatus) DeepCopyInto(out *BucketClaimStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketClaimStatus. +func (in *BucketClaimStatus) DeepCopy() *BucketClaimStatus { + if in == nil { + return nil + } + out := new(BucketClaimStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BucketClass) DeepCopyInto(out *BucketClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketClass. +func (in *BucketClass) DeepCopy() *BucketClass { + if in == nil { + return nil + } + out := new(BucketClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketClass) 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 *BucketClassList) DeepCopyInto(out *BucketClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BucketClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketClassList. +func (in *BucketClassList) DeepCopy() *BucketClassList { + if in == nil { + return nil + } + out := new(BucketClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketClassList) 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 *BucketList) DeepCopyInto(out *BucketList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Bucket, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketList. +func (in *BucketList) DeepCopy() *BucketList { + if in == nil { + return nil + } + out := new(BucketList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BucketList) 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 *BucketSpec) DeepCopyInto(out *BucketSpec) { + *out = *in + if in.BucketClaim != nil { + in, out := &in.BucketClaim, &out.BucketClaim + *out = new(v1.ObjectReference) + **out = **in + } + if in.Protocols != nil { + in, out := &in.Protocols, &out.Protocols + *out = make([]Protocol, len(*in)) + copy(*out, *in) + } + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketSpec. +func (in *BucketSpec) DeepCopy() *BucketSpec { + if in == nil { + return nil + } + out := new(BucketSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BucketStatus) DeepCopyInto(out *BucketStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketStatus. +func (in *BucketStatus) DeepCopy() *BucketStatus { + if in == nil { + return nil + } + out := new(BucketStatus) + in.DeepCopyInto(out) + return out +}