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
Add kube-api-linter to `make lint`.
kube-api-linter is based on golangci-lint v2, so it is upgraded to the
latest version.
kube-api-linter could be integrated with COSI CI in many ways. After
experimentation, it is fastest to run it as a standalone install rather
than build it each time `make lint` is run.
Signed-off-by: Blaine Gardner <[email protected]>
Copy file name to clipboardExpand all lines: client/apis/objectstorage/v1alpha2/bucket_types.go
+27-25Lines changed: 27 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -37,23 +37,23 @@ const (
37
37
)
38
38
39
39
// BucketSpec defines the desired state of Bucket
40
-
// +kubebuilder:validation:XValidation:message="parameters map is immutable",rule="has(oldSelf.parameters) == has(self.parameters)"
41
-
// +kubebuilder:validation:XValidation:message="protocols list is immutable",rule="has(oldSelf.protocols) == has(self.protocols)"
42
-
// +kubebuilder:validation:XValidation:message="existingBucketID is immutable",rule="has(oldSelf.existingBucketID) == has(self.existingBucketID)"
40
+
// +kubebuilder:validation:XValidation:message="parameters map cannot be added or removed after creation",rule="has(oldSelf.parameters) == has(self.parameters)"
41
+
// +kubebuilder:validation:XValidation:message="protocols list cannot be added or removed after creation",rule="has(oldSelf.protocols) == has(self.protocols)"
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
45
// +required
46
46
// +kubebuilder:validation:MinLength=1
47
47
// +kubebuilder:validation:XValidation:message="driverName is immutable",rule="self == oldSelf"
48
-
DriverNamestring`json:"driverName"`
48
+
DriverNamestring`json:"driverName,omitempty"`
49
49
50
50
// deletionPolicy determines whether a Bucket should be deleted when its bound BucketClaim is
51
51
// deleted. This is mutable to allow Admins to change the policy after creation.
52
52
// Possible values:
53
53
// - Retain: keep both the Bucket object and the backend bucket
54
54
// - Delete: delete both the Bucket object and the backend bucket
Copy file name to clipboardExpand all lines: docs/src/api/out.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -333,7 +333,7 @@ _Appears in:_
333
333
| Field | Description | Default | Validation |
334
334
| --- | --- | --- | --- |
335
335
|`name`_string_| name is the name of the BucketClaim being referenced. || MaxLength: 253 <br />MinLength: 1 <br /> |
336
-
|`namespace`_string_| namespace is the namespace of the BucketClaim being referenced.<br />If empty, the Kubernetes 'default' namespace is assumed.<br />namespace is immutable except to update '' to 'default'. || MaxLength: 253 <br />MinLength: 0 <br /> |
336
+
|`namespace`_string_| namespace is the namespace of the BucketClaim being referenced.|| MaxLength: 253 <br />MinLength: 1 <br /> |
337
337
|`uid`_[UID](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#uid-types-pkg)_| uid is the UID of the BucketClaim being referenced. |||
338
338
339
339
@@ -495,7 +495,7 @@ _Appears in:_
495
495
|`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. |||
496
496
|`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 /> |
497
497
|`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. |||
498
-
|`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. |||
498
+
|`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 />|
0 commit comments