Open rootfs opened 3 years ago
SubRegion can be empty. It currently has the following definition
SubRegion
type Endpoint struct { BucketHost string `json:"bucketHost"` BucketPort int `json:"bucketPort"` BucketName string `json:"bucketName"` Region string `json:"region"` SubRegion string `json:"subRegion"` AdditionalConfigData map[string]string `json:"additionalConfig"` }
That causes trouble when provisioner doesn't set it with meaningful value as in here
It should cope with this situation by
type Endpoint struct { BucketHost string `json:"bucketHost"` BucketPort int `json:"bucketPort"` BucketName string `json:"bucketName"` Region string `json:"region"` SubRegion string `json:"subRegion,omitempty"` AdditionalConfigData map[string]string `json:"additionalConfig"` }
@leseb @copejon
This is due to the OpenAPIV3 scheme. The subRegion is defined as type: string, meaning it will not accept null type by default. The fix should be to add nullable: true to the subRegion schema.
type: string
nullable: true
https://github.com/kube-object-storage/lib-bucket-provisioner/blob/4bea5edaff58c0e80e3ad0c56f2894a7d456cc87/deploy/crds/objectbucket_v1alpha1_objectbucket_crd.yaml#L96-L98
SubRegion
can be empty. It currently has the following definitionThat causes trouble when provisioner doesn't set it with meaningful value as in here
It should cope with this situation by
@leseb @copejon