Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 35c1c5c

Browse files
committed
fix(deletionPolicy): wrong case
1 parent 76de08e commit 35c1c5c

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

Diff for: apis/objectstorage/v1alpha1/types.go

+10-14
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ func init() {
3333
type DeletionPolicy string
3434

3535
const (
36-
DeletionPolicyRetain DeletionPolicy = "Retain"
37-
DeletionPolicyDelete DeletionPolicy = "Delete"
36+
DeletionPolicyRetain DeletionPolicy = "Retain"
37+
DeletionPolicyDelete DeletionPolicy = "Delete"
3838
)
3939

4040
type Protocol string
@@ -60,8 +60,8 @@ const (
6060
// +kubebuilder:subresource:status
6161
type Bucket struct {
6262
metav1.TypeMeta `json:",inline"`
63-
// +optional
6463

64+
// +optional
6565
metav1.ObjectMeta `json:"metadata,omitempty"`
6666

6767
Spec BucketSpec `json:"spec,omitempty"`
@@ -77,7 +77,7 @@ type BucketSpec struct {
7777
// Name of the BucketClass specified in the BucketRequest
7878
BucketClassName string `json:"bucketClassName"`
7979

80-
// Name of the BucketClaim that resulted in the creation of this Bucket
80+
// Name of the BucketClaim that resulted in the creation of this Bucket
8181
// In case the Bucket object was created manually, then this should refer
8282
// to the BucketClaim with which this Bucket should be bound
8383
BucketClaim *corev1.ObjectReference `json:"bucketClaim"`
@@ -98,7 +98,7 @@ type BucketSpec struct {
9898
// - Delete: Indicates that the bucket should be deleted from the OSP
9999
// once all the workloads accessing this bucket are done
100100
// +optional
101-
// +kubebuilder:default:=retain
101+
// +kubebuilder:default:=Retain
102102
DeletionPolicy DeletionPolicy `json:"deletionPolicy"`
103103

104104
// ExistingBucketID is the unique id of the bucket in the OSP. This field should be
@@ -120,7 +120,6 @@ type BucketStatus struct {
120120
}
121121

122122
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
123-
124123
type BucketList struct {
125124
metav1.TypeMeta `json:",inline"`
126125
metav1.ListMeta `json:"metadata,omitempty"`
@@ -134,8 +133,8 @@ type BucketList struct {
134133
// +kubebuilder:storageversion
135134
type BucketClaim struct {
136135
metav1.TypeMeta `json:",inline"`
137-
// +optional
138136

137+
// +optional
139138
metav1.ObjectMeta `json:"metadata,omitempty"`
140139

141140
Spec BucketClaimSpec `json:"spec,omitempty"`
@@ -168,14 +167,13 @@ type BucketClaimStatus struct {
168167
BucketReady bool `json:"bucketReady"`
169168

170169
// BucketName is the name of the provisioned Bucket in response
171-
// to this BucketClaim. It is generated and set by the COSI controller
170+
// to this BucketClaim. It is generated and set by the COSI controller
172171
// before making the creation request to the OSP backend.
173172
// +optional
174173
BucketName string `json:"bucketName,omitempty"`
175174
}
176175

177176
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
178-
179177
type BucketClaimList struct {
180178
metav1.TypeMeta `json:",inline"`
181179
metav1.ListMeta `json:"metadata,omitempty"`
@@ -202,7 +200,7 @@ type BucketClass struct {
202200
// - Retain: Indicates that the bucket should not be deleted from the OSP
203201
// - Delete: Indicates that the bucket should be deleted from the OSP
204202
// once all the workloads accessing this bucket are done
205-
// +kubebuilder:default:=retain
203+
// +kubebuilder:default:=Retain
206204
DeletionPolicy DeletionPolicy `json:"deletionPolicy"`
207205

208206
// Parameters is an opaque map for passing in configuration to a driver
@@ -212,7 +210,6 @@ type BucketClass struct {
212210
}
213211

214212
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
215-
216213
type BucketClassList struct {
217214
metav1.TypeMeta `json:",inline"`
218215
metav1.ListMeta `json:"metadata,omitempty"`
@@ -276,11 +273,11 @@ type BucketAccessSpec struct {
276273
// BucketClaimName is the name of the BucketClaim.
277274
BucketClaimName string `json:"bucketClaimName"`
278275

279-
// Protocol is the name of the Protocol
276+
// Protocol is the name of the Protocol
280277
// that this access credential is supposed to support
281278
// If left empty, it will choose the protocol supported
282279
// by the bucket. If the bucket supports multiple protocols,
283-
// the end protocol is determined by the driver.
280+
// the end protocol is determined by the driver.
284281
// +optional
285282
Protocol Protocol `json:"protocol,omitempty"`
286283

@@ -317,4 +314,3 @@ type BucketAccessList struct {
317314
metav1.ListMeta `json:"metadata,omitempty"`
318315
Items []BucketAccess `json:"items"`
319316
}
320-

Diff for: crds/objectstorage.k8s.io_bucketclasses.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2626
type: string
2727
deletionPolicy:
28-
default: retain
28+
default: Retain
2929
description: 'DeletionPolicy is used to specify how COSI should handle
3030
deletion of this bucket. There are 2 possible values: - Retain: Indicates
3131
that the bucket should not be deleted from the OSP - Delete: Indicates

Diff for: crds/objectstorage.k8s.io_buckets.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ spec:
7777
description: Name of the BucketClass specified in the BucketRequest
7878
type: string
7979
deletionPolicy:
80-
default: retain
80+
default: Retain
8181
description: 'DeletionPolicy is used to specify how COSI should handle
8282
deletion of this bucket. There are 2 possible values: - Retain:
8383
Indicates that the bucket should not be deleted from the OSP (default)

0 commit comments

Comments
 (0)