You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: client/apis/objectstorage/v1alpha2/bucket_types.go
+29-10Lines changed: 29 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,11 @@ const (
42
42
// +kubebuilder:validation:XValidation:message="existingBucketID cannot be added or removed after creation",rule="has(oldSelf.existingBucketID) == has(self.existingBucketID)"
43
43
typeBucketSpecstruct {
44
44
// driverName is the name of the driver that fulfills requests for this Bucket.
45
+
// Must be 63 characters or less, beginning and ending with an alphanumeric character
46
+
// ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between.
45
47
// +required
46
-
// +kubebuilder:validation:MinLength=1
47
48
// +kubebuilder:validation:XValidation:message="driverName is immutable",rule="self == oldSelf"
48
-
DriverNamestring`json:"driverName,omitempty"`
49
+
DriverNameDriverName`json:"driverName,omitempty"`
49
50
50
51
// deletionPolicy determines whether a Bucket should be deleted when its bound BucketClaim is
51
52
// deleted. This is mutable to allow Admins to change the policy after creation.
@@ -58,52 +59,68 @@ type BucketSpec struct {
58
59
// parameters is an opaque map of driver-specific configuration items passed to the driver that
59
60
// fulfills requests for this Bucket.
60
61
// +optional
62
+
// +kubebuilder:validation:MinProperties=1
61
63
// +kubebuilder:validation:XValidation:message="parameters map is immutable",rule="self == oldSelf"
Copy file name to clipboardExpand all lines: docs/src/api/out.md
+45-8Lines changed: 45 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -333,9 +333,9 @@ _Appears in:_
333
333
334
334
| Field | Description | Default | Validation |
335
335
| --- | --- | --- | --- |
336
-
|`name`_string_| name is the name of the BucketClaim being referenced. || MaxLength: 253 <br />MinLength: 1 <br /> |
337
-
|`namespace`_string_| namespace is the namespace of the BucketClaim being referenced.|| MaxLength: 253 <br />MinLength: 1 <br /> |
338
-
|`uid`_[UID](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#uid-types-pkg)_| uid is the UID of the BucketClaim being referenced.|||
336
+
|`name`_string_| name is the name of the BucketClaim being referenced.<br />Must be a valid Kubernetes resource name: at most 253 characters and consisting only of<br />lower-case alphanumeric characters, hyphens, and periods, starting and ending with an<br />alphanumeric character.|| MaxLength: 253 <br />MinLength: 1 <br /> |
337
+
|`namespace`_string_| namespace is the namespace of the BucketClaim being referenced.<br />Must be a valid Kubernetes Namespace name: at most 63 characters and consisting only of<br />lower-case alphanumeric characters and hyphens, starting and ending with alphanumerics.<br />It must be at most 63 characters in length and consist only of lower-case alphanumeric<br />characters and hyphens, and must start and end with an alphanumeric character. || MaxLength: 63 <br />MinLength: 1 <br /> |
338
+
|`uid`_[UID](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#uid-types-pkg)_| uid is the UID of the BucketClaim being referenced.<br />Must be a valid Kubernetes UID: RFC 4122 form with lowercase hexadecimal characters<br />(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). ||MaxLength: 36 <br />MinLength: 36 <br />Pattern: `^[0-9a-f]\{8\}-([0-9a-f]\{4\}\-)\{3\}[0-9a-f]\{12\}$` <br />Type: string <br />|
339
339
340
340
341
341
#### BucketClaimSpec
@@ -492,12 +492,12 @@ _Appears in:_
492
492
493
493
| Field | Description | Default | Validation |
494
494
| --- | --- | --- | --- |
495
-
|`driverName`_string_| driverName is the name of the driver that fulfills requests for this Bucket.|| MinLength: 1 <br /> |
495
+
|`driverName`_[DriverName](#drivername)_| driverName is the name of the driver that fulfills requests for this Bucket.<br />Must be 63 characters or less, beginning and ending with an alphanumeric character<br />([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. ||MaxLength: 63 <br />MinLength: 1 <br />Pattern: `^[a-zA-Z0-9]([a-zA-Z0-9\-\.]\{0,61\}[a-zA-Z0-9])?$` <br /> |
496
496
|`deletionPolicy`_[BucketDeletionPolicy](#bucketdeletionpolicy)_| deletionPolicy determines whether a Bucket should be deleted when its bound BucketClaim is<br />deleted. This is mutable to allow Admins to change the policy after creation.<br />Possible values:<br /> - Retain: keep both the Bucket object and the backend bucket<br /> - Delete: delete both the Bucket object and the backend bucket || Enum: [Retain Delete] <br /> |
497
-
|`parameters`_object (keys:string, values:string)_| parameters is an opaque map of driver-specific configuration items passed to the driver that<br />fulfills requests for this Bucket. |||
498
-
|`protocols`_[ObjectProtocol](#objectprotocol) array_| protocols lists object store protocols that the provisioned Bucket must support.<br />If specified, COSI will verify that each item is advertised as supported by the driver. || Enum: [S3 Azure GCS] <br /> |
499
-
|`bucketClaim`_[BucketClaimReference](#bucketclaimreference)_|bucketClaim references the BucketClaim that resulted in the creation of this Bucket.<br />For statically-provisioned buckets, set the namespace and name of the BucketClaim that is<br />allowed to bind to this Bucket. |||
500
-
|`existingBucketID`_string_| existingBucketID is the unique identifier for an existing backend bucket known to the driver.<br />Use driver documentation to determine how to set this value.<br />This field is used only for Bucket static provisioning.<br />This field will be empty when the Bucket is dynamically provisioned from a BucketClaim.|| MinLength: 1 <br /> |
497
+
|`parameters`_object (keys:string, values:string)_| parameters is an opaque map of driver-specific configuration items passed to the driver that<br />fulfills requests for this Bucket. ||MinProperties: 1 <br />|
498
+
|`protocols`_[ObjectProtocol](#objectprotocol) array_| protocols lists object store protocols that the provisioned Bucket must support.<br />If specified, COSI will verify that each item is advertised as supported by the driver.<br />Possible values: 'S3', 'Azure', 'GCS'.|| Enum: [S3 Azure GCS] <br /> |
499
+
|`bucketClaimRef`_[BucketClaimReference](#bucketclaimreference)_|bucketClaimRef references the BucketClaim that resulted in the creation of this Bucket.<br />For statically-provisioned buckets, set the namespace and name of the BucketClaim that is<br />allowed to bind to this Bucket. |||
500
+
|`existingBucketID`_[DriverResourceID](#driverresourceid)_| existingBucketID is the unique identifier for an existing backend bucket known to the driver.<br />Use driver documentation to determine how to set this value.<br />This field is used only for static Bucket provisioning.<br />This field will be empty when the Bucket is dynamically provisioned from a BucketClaim.<br />Must be at most 2048 characters and consist only of alphanumeric characters ([a-z0-9A-Z]),<br />dashes (-), and dots (.). ||MaxLength: 2048 <br />MinLength: 1 <br />Pattern: `^[a-zA-Z0-9._-]+$` <br />Type: string <br /> |
501
501
502
502
503
503
#### BucketStatus
@@ -543,6 +543,43 @@ _Appears in:_
543
543
544
544
545
545
546
+
#### DriverName
547
+
548
+
_Underlying type:__string_
549
+
550
+
DriverName represents the name of a driver.
551
+
Must be 63 characters or less, beginning and ending with an alphanumeric character
552
+
([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between.
0 commit comments