@@ -80,16 +80,14 @@ type VolumeGroupSnapshotStatus struct {
8080 // VolumeGroupSnapshot and VolumeGroupSnapshotContent objects is successful
8181 // (by validating that both VolumeGroupSnapshot and VolumeGroupSnapshotContent
8282 // point at each other) before using this object.
83+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="boundVolumeGroupSnapshotContentName is immutable once set"
8384 // +optional
8485 BoundVolumeGroupSnapshotContentName * string `json:"boundVolumeGroupSnapshotContentName,omitempty" protobuf:"bytes,1,opt,name=boundVolumeGroupSnapshotContentName"`
8586
8687 // CreationTime is the timestamp when the point-in-time group snapshot is taken
8788 // by the underlying storage system.
8889 // If not specified, it may indicate that the creation time of the group snapshot
8990 // is unknown.
90- // The format of this field is a Unix nanoseconds time encoded as an int64.
91- // On Unix, the command date +%s%N returns the current time in nanoseconds
92- // since 1970-01-01 00:00:00 UTC.
9391 // This field is updated based on the CreationTime field in VolumeGroupSnapshotContentStatus
9492 // +optional
9593 CreationTime * metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"`
@@ -177,11 +175,13 @@ type VolumeGroupSnapshotClass struct {
177175
178176 // Driver is the name of the storage driver expected to handle this VolumeGroupSnapshotClass.
179177 // Required.
178+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="driver is immutable once set"
180179 Driver string `json:"driver" protobuf:"bytes,2,opt,name=driver"`
181180
182181 // Parameters is a key-value map with storage driver specific parameters for
183182 // creating group snapshots.
184183 // These values are opaque to Kubernetes and are passed directly to the driver.
184+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="parameters are immutable once set"
185185 // +optional
186186 Parameters map [string ]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
187187
@@ -194,6 +194,7 @@ type VolumeGroupSnapshotClass struct {
194194 // "Delete" means that the VolumeGroupSnapshotContent and its physical group
195195 // snapshot on underlying storage system are deleted.
196196 // Required.
197+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="deletionPolicy is immutable once set"
197198 DeletionPolicy snapshotv1.DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,4,opt,name=deletionPolicy"`
198199}
199200
@@ -293,6 +294,7 @@ type VolumeGroupSnapshotContentSpec struct {
293294 // This MUST be the same as the name returned by the CSI GetPluginName() call for
294295 // that driver.
295296 // Required.
297+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="driver is immutable once set"
296298 Driver string `json:"driver" protobuf:"bytes,3,opt,name=driver"`
297299
298300 // VolumeGroupSnapshotClassName is the name of the VolumeGroupSnapshotClass from
@@ -303,6 +305,7 @@ type VolumeGroupSnapshotContentSpec struct {
303305 // For dynamic provisioning, this field must be set.
304306 // This field may be unset for pre-provisioned snapshots.
305307 // +optional
308+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeGroupSnapshotClassName is immutable once set"
306309 VolumeGroupSnapshotClassName * string `json:"volumeGroupSnapshotClassName,omitempty" protobuf:"bytes,4,opt,name=volumeGroupSnapshotClassName"`
307310
308311 // Source specifies whether the snapshot is (or should be) dynamically provisioned
@@ -344,15 +347,13 @@ type VolumeGroupSnapshotContentStatus struct {
344347 // If a storage system does not provide such an id, the
345348 // CSI driver can choose to return the VolumeGroupSnapshot name.
346349 // +optional
350+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeGroupSnapshotHandle is immutable once set"
347351 VolumeGroupSnapshotHandle * string `json:"volumeGroupSnapshotHandle,omitempty" protobuf:"bytes,1,opt,name=volumeGroupSnapshotHandle"`
348352
349353 // CreationTime is the timestamp when the point-in-time group snapshot is taken
350354 // by the underlying storage system.
351355 // If not specified, it indicates the creation time is unknown.
352356 // If not specified, it means the readiness of a group snapshot is unknown.
353- // The format of this field is a Unix nanoseconds time encoded as an int64.
354- // On Unix, the command date +%s%N returns the current time in nanoseconds
355- // since 1970-01-01 00:00:00 UTC.
356357 // This field is the source for the CreationTime field in VolumeGroupSnapshotStatus
357358 // +optional
358359 CreationTime * metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"`
0 commit comments