diff --git a/apis/objectstorage.k8s.io/v1alpha1/azure_types.go b/apis/objectstorage.k8s.io/v1alpha1/azure_types.go deleted file mode 100644 index 51a707ee..00000000 --- a/apis/objectstorage.k8s.io/v1alpha1/azure_types.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -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=false - -package v1alpha1 - -import osspec "sigs.k8s.io/container-object-storage-interface-spec" - -type AzureProtocol struct { - StorageAccount string `json:"storageAccount,omitempty"` -} - -func (azure *AzureProtocol) ConvertToExternal() *osspec.Protocol_AzureBlob { - return &osspec.Protocol_AzureBlob{ - AzureBlob: &osspec.AzureBlob{ - StorageAccount: azure.StorageAccount, - }, - } -} - -func ConvertFromAzureExternal(ext *osspec.AzureBlob) *AzureProtocol { - return &AzureProtocol{ - StorageAccount: ext.StorageAccount, - } -} diff --git a/apis/objectstorage.k8s.io/v1alpha1/gcs_types.go b/apis/objectstorage.k8s.io/v1alpha1/gcs_types.go deleted file mode 100644 index cc2bcd6b..00000000 --- a/apis/objectstorage.k8s.io/v1alpha1/gcs_types.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -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=false - -package v1alpha1 - -import osspec "sigs.k8s.io/container-object-storage-interface-spec" - -type GCSProtocol struct { - PrivateKeyName string `json:"privateKeyName,omitempty"` - ProjectID string `json:"projectID,omitempty"` - ServiceAccount string `json:"serviceAccount,omitempty"` -} - -func (gcs *GCSProtocol) ConvertToExternal() *osspec.Protocol_Gcs { - return &osspec.Protocol_Gcs{ - Gcs: &osspec.GCS{ - PrivateKeyName: gcs.PrivateKeyName, - ProjectId: gcs.ProjectID, - ServiceAccount: gcs.ServiceAccount, - }, - } -} - -func ConvertFromGCSExternal(ext *osspec.GCS) *GCSProtocol { - return &GCSProtocol{ - PrivateKeyName: ext.PrivateKeyName, - ProjectID: ext.ProjectId, - ServiceAccount: ext.ServiceAccount, - } -} diff --git a/apis/objectstorage.k8s.io/v1alpha1/openapi_generated.go b/apis/objectstorage.k8s.io/v1alpha1/openapi_generated.go index a0af6b3d..d122f1c5 100644 --- a/apis/objectstorage.k8s.io/v1alpha1/openapi_generated.go +++ b/apis/objectstorage.k8s.io/v1alpha1/openapi_generated.go @@ -29,7 +29,6 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.AzureProtocol": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_AzureProtocol(ref), "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.Bucket": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_Bucket(ref), "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.BucketAccess": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_BucketAccess(ref), "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.BucketAccessClass": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_BucketAccessClass(ref), @@ -50,27 +49,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.BucketRequestStatus": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_BucketRequestStatus(ref), "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.BucketSpec": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_BucketSpec(ref), "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.BucketStatus": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_BucketStatus(ref), - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.GCSProtocol": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_GCSProtocol(ref), - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.Protocol": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_Protocol(ref), - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.S3Protocol": schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_S3Protocol(ref), - } -} - -func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_AzureProtocol(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "storageAccount": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, } } @@ -192,11 +170,6 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "policyActionsConfigMap": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, "parameters": { SchemaProps: spec.SchemaProps{ Type: []string{"object"}, @@ -216,7 +189,7 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } @@ -501,12 +474,6 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, - "policyActionsConfigMapData": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "parameters": { SchemaProps: spec.SchemaProps{ Type: []string{"object"}, @@ -624,12 +591,6 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp }, }, }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.Protocol"), - }, - }, "deletionPolicy": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -652,11 +613,10 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp }, }, }, - Required: []string{"protocol"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.Protocol"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } @@ -868,7 +828,15 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp Format: "", }, }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, }, + Required: []string{"protocol"}, }, }, } @@ -949,8 +917,9 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp }, "protocol": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.Protocol"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, "parameters": { @@ -987,7 +956,7 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.Protocol"}, + "k8s.io/api/core/v1.ObjectReference"}, } } @@ -1021,86 +990,3 @@ func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alp }, } } - -func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_GCSProtocol(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "privateKeyName": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "projectID": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "serviceAccount": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_Protocol(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "s3": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.S3Protocol"), - }, - }, - "azureBlob": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.AzureProtocol"), - }, - }, - "gcs": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.GCSProtocol"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.AzureProtocol", "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.GCSProtocol", "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1.S3Protocol"}, - } -} - -func schema_container_object_storage_interface_api_apis_objectstoragek8sio_v1alpha1_S3Protocol(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "region": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "signatureVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} diff --git a/apis/objectstorage.k8s.io/v1alpha1/protocol_types.go b/apis/objectstorage.k8s.io/v1alpha1/protocol_types.go deleted file mode 100644 index 2c52bb56..00000000 --- a/apis/objectstorage.k8s.io/v1alpha1/protocol_types.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -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 v1alpha1 - -import ( - "errors" - - cosi "sigs.k8s.io/container-object-storage-interface-spec" -) - -type ProtocolName string - -const ( - InvalidProtocol = "invalid protocol" -) - -type Protocol struct { - // +optional - S3 *S3Protocol `json:"s3,omitempty"` - - // +optional - AzureBlob *AzureProtocol `json:"azureBlob,omitempty"` - - // +optional - GCS *GCSProtocol `json:"gcs,omitempty"` -} - -func (in *Protocol) ConvertToExternal() (*cosi.Protocol, error) { - external := &cosi.Protocol{} - - protoFound := false - if in.S3 != nil { - protoFound = true - external.Type = in.S3.ConvertToExternal() - } - if in.AzureBlob != nil { - protoFound = true - external.Type = in.AzureBlob.ConvertToExternal() - } - if in.GCS != nil { - protoFound = true - external.Type = in.GCS.ConvertToExternal() - } - - if !protoFound { - return external, errors.New(InvalidProtocol) - } - - return external, nil -} - -func ConvertFromProtocolExternal(external *cosi.Protocol) (*Protocol, error) { - in := &Protocol{} - - protoFound := false - if external.GetS3() != nil { - protoFound = true - in.S3 = ConvertFromS3External(external.GetS3()) - } - if external.GetAzureBlob() != nil { - protoFound = true - in.AzureBlob = ConvertFromAzureExternal(external.GetAzureBlob()) - } - if external.GetGcs() != nil { - protoFound = true - in.GCS = ConvertFromGCSExternal(external.GetGcs()) - } - if !protoFound { - return nil, errors.New(InvalidProtocol) - } - - return in, nil -} diff --git a/apis/objectstorage.k8s.io/v1alpha1/s3_types.go b/apis/objectstorage.k8s.io/v1alpha1/s3_types.go deleted file mode 100644 index 92814845..00000000 --- a/apis/objectstorage.k8s.io/v1alpha1/s3_types.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -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=false - -package v1alpha1 - -import ( - osspec "sigs.k8s.io/container-object-storage-interface-spec" -) - -type S3SignatureVersion string - -const ( - S3SignatureVersionV2 S3SignatureVersion = "S3V2" - S3SignatureVersionV4 S3SignatureVersion = "S3V4" -) - -type S3Protocol struct { - Region string `json:"region,omitempty"` - // +kubebuilder:validation:Enum:={S3V2,S3V4} - SignatureVersion S3SignatureVersion `json:"signatureVersion,omitempty"` -} - -func (s3 *S3Protocol) ConvertToExternal() *osspec.Protocol_S3 { - sigver, ok := osspec.S3SignatureVersion_value[string(s3.SignatureVersion)] - if !ok { - // NOTE - 0 here is equivalent to UnknownSignature - sigver = 0 - } - return &osspec.Protocol_S3{ - S3: &osspec.S3{ - Region: s3.Region, - SignatureVersion: osspec.S3SignatureVersion(sigver), - }, - } -} - -func ConvertFromS3External(ext *osspec.S3) *S3Protocol { - vers, ok := osspec.S3SignatureVersion_name[int32(ext.SignatureVersion)] - if !ok { - vers = osspec.S3SignatureVersion_name[0] - } - return &S3Protocol{ - Region: ext.Region, - SignatureVersion: S3SignatureVersion(vers), - } -} diff --git a/apis/objectstorage.k8s.io/v1alpha1/types.go b/apis/objectstorage.k8s.io/v1alpha1/types.go index 372e66fb..dded5cee 100644 --- a/apis/objectstorage.k8s.io/v1alpha1/types.go +++ b/apis/objectstorage.k8s.io/v1alpha1/types.go @@ -39,6 +39,14 @@ const ( DeletionPolicyForceDelete DeletionPolicy = "Force" ) +type Protocol string + +const ( + S3Protocol Protocol = "S3" + GCSProtocol Protocol = "GCP" + AzureProtocol Protocol = "Azure" +) + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -128,6 +136,8 @@ type BucketRequestSpec struct { // +optional BucketClassName string `json:"bucketClassName,omitempty"` + + Protocol Protocol `json:"protocol"` } type BucketRequestStatus struct { @@ -172,8 +182,6 @@ type BucketClass struct { // +optional AllowedNamespaces []string `json:"allowedNamespaces,omitempty"` - Protocol Protocol `json:"protocol"` - // +kubebuilder:default:=retain DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"` @@ -202,8 +210,6 @@ type BucketAccessClass struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - PolicyActionsConfigMap *corev1.ObjectReference `json:"policyActionsConfigMap,omitempty"` - // +optional Parameters map[string]string `json:"parameters,omitempty"` } @@ -245,8 +251,6 @@ type BucketAccessSpec struct { // +optional ServiceAccount *corev1.ObjectReference `json:"serviceAccount,omitempty"` - PolicyActionsConfigMapData string `json:"policyActionsConfigMapData,omitempty"` - // +optional Parameters map[string]string `json:"parameters,omitempty"` } diff --git a/apis/objectstorage.k8s.io/v1alpha1/zz_generated.deepcopy.go b/apis/objectstorage.k8s.io/v1alpha1/zz_generated.deepcopy.go index 9ea478a4..62d7f70b 100644 --- a/apis/objectstorage.k8s.io/v1alpha1/zz_generated.deepcopy.go +++ b/apis/objectstorage.k8s.io/v1alpha1/zz_generated.deepcopy.go @@ -25,22 +25,6 @@ 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 *AzureProtocol) DeepCopyInto(out *AzureProtocol) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureProtocol. -func (in *AzureProtocol) DeepCopy() *AzureProtocol { - if in == nil { - return nil - } - out := new(AzureProtocol) - in.DeepCopyInto(out) - return out -} - // 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 @@ -102,11 +86,6 @@ func (in *BucketAccessClass) DeepCopyInto(out *BucketAccessClass) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.PolicyActionsConfigMap != nil { - in, out := &in.PolicyActionsConfigMap, &out.PolicyActionsConfigMap - *out = new(v1.ObjectReference) - **out = **in - } if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters *out = make(map[string]string, len(*in)) @@ -358,7 +337,6 @@ func (in *BucketClass) DeepCopyInto(out *BucketClass) { *out = make([]string, len(*in)) copy(*out, *in) } - in.Protocol.DeepCopyInto(&out.Protocol) if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters *out = make(map[string]string, len(*in)) @@ -559,7 +537,6 @@ func (in *BucketSpec) DeepCopyInto(out *BucketSpec) { *out = make([]string, len(*in)) copy(*out, *in) } - in.Protocol.DeepCopyInto(&out.Protocol) if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters *out = make(map[string]string, len(*in)) @@ -595,66 +572,3 @@ func (in *BucketStatus) DeepCopy() *BucketStatus { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCSProtocol) DeepCopyInto(out *GCSProtocol) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCSProtocol. -func (in *GCSProtocol) DeepCopy() *GCSProtocol { - if in == nil { - return nil - } - out := new(GCSProtocol) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Protocol) DeepCopyInto(out *Protocol) { - *out = *in - if in.S3 != nil { - in, out := &in.S3, &out.S3 - *out = new(S3Protocol) - **out = **in - } - if in.AzureBlob != nil { - in, out := &in.AzureBlob, &out.AzureBlob - *out = new(AzureProtocol) - **out = **in - } - if in.GCS != nil { - in, out := &in.GCS, &out.GCS - *out = new(GCSProtocol) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Protocol. -func (in *Protocol) DeepCopy() *Protocol { - if in == nil { - return nil - } - out := new(Protocol) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *S3Protocol) DeepCopyInto(out *S3Protocol) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Protocol. -func (in *S3Protocol) DeepCopy() *S3Protocol { - if in == nil { - return nil - } - out := new(S3Protocol) - in.DeepCopyInto(out) - return out -} diff --git a/crds/objectstorage.k8s.io_bucketaccessclasses.yaml b/crds/objectstorage.k8s.io_bucketaccessclasses.yaml index 4fd63c15..29949523 100644 --- a/crds/objectstorage.k8s.io_bucketaccessclasses.yaml +++ b/crds/objectstorage.k8s.io_bucketaccessclasses.yaml @@ -32,31 +32,6 @@ spec: additionalProperties: type: string type: object - policyActionsConfigMap: - description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object type: object served: true storage: true diff --git a/crds/objectstorage.k8s.io_bucketaccesses.yaml b/crds/objectstorage.k8s.io_bucketaccesses.yaml index ee6d9c75..7bbcb521 100644 --- a/crds/objectstorage.k8s.io_bucketaccesses.yaml +++ b/crds/objectstorage.k8s.io_bucketaccesses.yaml @@ -61,8 +61,6 @@ spec: additionalProperties: type: string type: object - policyActionsConfigMapData: - type: string serviceAccount: description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' properties: diff --git a/crds/objectstorage.k8s.io_bucketclasses.yaml b/crds/objectstorage.k8s.io_bucketclasses.yaml index f62a34de..4baba531 100644 --- a/crds/objectstorage.k8s.io_bucketclasses.yaml +++ b/crds/objectstorage.k8s.io_bucketclasses.yaml @@ -43,37 +43,8 @@ spec: additionalProperties: type: string type: object - protocol: - properties: - azureBlob: - properties: - storageAccount: - type: string - type: object - gcs: - properties: - privateKeyName: - type: string - projectID: - type: string - serviceAccount: - type: string - type: object - s3: - properties: - region: - type: string - signatureVersion: - enum: - - S3V2 - - S3V4 - type: string - type: object - type: object provisioner: type: string - required: - - protocol type: object served: true storage: true diff --git a/crds/objectstorage.k8s.io_bucketrequests.yaml b/crds/objectstorage.k8s.io_bucketrequests.yaml index d0d0b915..5c55dd64 100644 --- a/crds/objectstorage.k8s.io_bucketrequests.yaml +++ b/crds/objectstorage.k8s.io_bucketrequests.yaml @@ -34,6 +34,10 @@ spec: type: string bucketPrefix: type: string + protocol: + type: string + required: + - protocol type: object status: properties: diff --git a/crds/objectstorage.k8s.io_buckets.yaml b/crds/objectstorage.k8s.io_buckets.yaml index d953e9c2..a1aafaf6 100644 --- a/crds/objectstorage.k8s.io_buckets.yaml +++ b/crds/objectstorage.k8s.io_buckets.yaml @@ -73,32 +73,7 @@ spec: type: string type: object protocol: - properties: - azureBlob: - properties: - storageAccount: - type: string - type: object - gcs: - properties: - privateKeyName: - type: string - projectID: - type: string - serviceAccount: - type: string - type: object - s3: - properties: - region: - type: string - signatureVersion: - enum: - - S3V2 - - S3V4 - type: string - type: object - type: object + type: string provisioner: type: string required: