Skip to content

Commit a0cef53

Browse files
authored
Merge pull request #1150 from leonardoce/update-vgs-beta
Update VolumeGroupSnapshot to v1beta1
2 parents b5e06f5 + 2c63f95 commit a0cef53

File tree

110 files changed

+774
-872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+774
-872
lines changed

client/apis/volumegroupsnapshot/v1alpha1/doc.go renamed to client/apis/volumegroupsnapshot/v1beta1/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ limitations under the License.
1717
// +k8s:deepcopy-gen=package
1818
// +groupName=groupsnapshot.storage.k8s.io
1919

20-
package v1alpha1
20+
package v1beta1

client/apis/volumegroupsnapshot/v1alpha1/register.go renamed to client/apis/volumegroupsnapshot/v1beta1/register.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
1313

14-
package v1alpha1
14+
package v1beta1
1515

1616
import (
1717
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -28,7 +28,7 @@ var (
2828
// AddToScheme adds to scheme
2929
AddToScheme = SchemeBuilder.AddToScheme
3030
// SchemeGroupVersion is the group version used to register these objects.
31-
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
31+
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
3232
)
3333

3434
func Resource(resource string) schema.GroupResource {
Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616
// +kubebuilder:object:generate=true
17-
package v1alpha1
17+
package v1beta1
1818

1919
import (
2020
core_v1 "k8s.io/api/core/v1"
@@ -90,6 +90,7 @@ type VolumeGroupSnapshotStatus struct {
9090
// The format of this field is a Unix nanoseconds time encoded as an int64.
9191
// On Unix, the command date +%s%N returns the current time in nanoseconds
9292
// since 1970-01-01 00:00:00 UTC.
93+
// This field is updated based on the CreationTime field in VolumeGroupSnapshotContentStatus
9394
// +optional
9495
CreationTime *metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"`
9596

@@ -110,15 +111,6 @@ type VolumeGroupSnapshotStatus struct {
110111
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
111112
}
112113

113-
// PVCVolumeSnapshotPair defines a pair of a PVC reference and a Volume Snapshot Reference
114-
type PVCVolumeSnapshotPair struct {
115-
// PersistentVolumeClaimRef is a reference to the PVC this pair is referring to
116-
PersistentVolumeClaimRef core_v1.LocalObjectReference `json:"persistentVolumeClaimRef,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeClaimRef"`
117-
118-
// VolumeSnapshotRef is a reference to the VolumeSnapshot this pair is referring to
119-
VolumeSnapshotRef core_v1.LocalObjectReference `json:"volumeSnapshotRef,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotRef"`
120-
}
121-
122114
//+genclient
123115
//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
124116

@@ -333,6 +325,7 @@ type VolumeGroupSnapshotContentStatus struct {
333325
// The format of this field is a Unix nanoseconds time encoded as an int64.
334326
// On Unix, the command date +%s%N returns the current time in nanoseconds
335327
// since 1970-01-01 00:00:00 UTC.
328+
// This field is the source for the CreationTime field in VolumeGroupSnapshotStatus
336329
// +optional
337330
CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,2,opt,name=creationTime"`
338331

@@ -354,16 +347,6 @@ type VolumeGroupSnapshotContentStatus struct {
354347
VolumeSnapshotHandlePairList []VolumeSnapshotHandlePair `json:"volumeSnapshotHandlePairList,omitempty" protobuf:"bytes,6,opt,name=volumeSnapshotHandlePairList"`
355348
}
356349

357-
// PVVolumeSnapshotContentPair represent a pair of PV names and
358-
// VolumeSnapshotContent names
359-
type PVVolumeSnapshotContentPair struct {
360-
// PersistentVolumeRef is a reference to the persistent volume resource
361-
PersistentVolumeRef core_v1.LocalObjectReference `json:"persistentVolumeRef,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeRef"`
362-
363-
// VolumeSnapshotContentRef is a reference to the volume snapshot content resource
364-
VolumeSnapshotContentRef core_v1.LocalObjectReference `json:"volumeSnapshotContentRef,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotContentRef"`
365-
}
366-
367350
// VolumeGroupSnapshotContentSource represents the CSI source of a group snapshot.
368351
// Exactly one of its members must be set.
369352
// Members in VolumeGroupSnapshotContentSource are immutable.
@@ -408,9 +391,11 @@ type GroupSnapshotHandles struct {
408391
type VolumeSnapshotHandlePair struct {
409392
// VolumeHandle is a unique id returned by the CSI driver to identify a volume
410393
// on the storage system
394+
// Required.
411395
VolumeHandle string `json:"volumeHandle" protobuf:"bytes,1,opt,name=volumeHandle"`
412396

413397
// SnapshotHandle is a unique id returned by the CSI driver to identify a volume
414398
// snapshot on the storage system
399+
// Required.
415400
SnapshotHandle string `json:"snapshotHandle" protobuf:"bytes,2,opt,name=snapshotHandle"`
416401
}
Lines changed: 1 addition & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/clientset/versioned/clientset.go

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/clientset/versioned/fake/clientset_generated.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/clientset/versioned/fake/register.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/clientset/versioned/scheme/register.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)