Move snapshot APIs from v1beta1 to v1#389
Move snapshot APIs from v1beta1 to v1#389xing-yang wants to merge 2 commits intokubernetes-csi:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xing-yang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/assign @yuxiangqian |
|
Note: Changes to tighten the validation is not done yet. |
9da3a7b to
5875e1d
Compare
|
per offline discussion, this PR will need further refinement. |
@yuxiangqian I have addressed your comments and made changes for phase 2: CRDs now have both v1beta1 and v1 schema, v1beta1 stored in API server, serving both v1 and v1beta1. |
vendor/github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1/types.go
Outdated
Show resolved
Hide resolved
vendor/github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1/types.go
Outdated
Show resolved
Hide resolved
vendor/github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1/types.go
Outdated
Show resolved
Hide resolved
vendor/github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1/types.go
Outdated
Show resolved
Hide resolved
vendor/github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1/types.go
Outdated
Show resolved
Hide resolved
vendor/github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1/types.go
Outdated
Show resolved
Hide resolved
vendor/github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1/types.go
Outdated
Show resolved
Hide resolved
|
|
||
| // name of the VolumeSnapshotClass to which this snapshot belongs. | ||
| // +optional | ||
| VolumeSnapshotClassName *string `json:"volumeSnapshotClassName,omitempty" protobuf:"bytes,4,opt,name=volumeSnapshotClassName"` |
There was a problem hiding this comment.
Should we create a Parameters field and copy the SnapshotClass.parameters field here. A snapshot must be able to operate independently of the SnapshotClass after provisioning. We have DeletionPolicy here already, which is good, but do we need parameters too?
There was a problem hiding this comment.
@msau42 reminded me that PV/PVC actually handles this in a better way. Instead of copying all parameters over from the Class object (which may include lots of unnecessary information), the CSI CreateVolumeResponse contains a set of volume_context -- basically letting the driver decide what additional important info should be maintained about the volume. We should do something similar here. See https://github.com/container-storage-interface/spec/blob/master/csi.proto#L488
There was a problem hiding this comment.
We'll take a look.
client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
Outdated
Show resolved
Hide resolved
5657e86 to
3a2029d
Compare
yuxiangqian
left a comment
There was a problem hiding this comment.
some nits, overall looks good! thanks Xing
...l-snapshotter/client/v3/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go
Show resolved
Hide resolved
072421f to
f2621c6
Compare
|
@saad-ali @msau42 @yuxiangqian addressed your comments. PTAL. |
|
@xing-yang: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Note: unit test failed because I manually modified release-tools to install the V1 snapshot CRDs. |
|
/hold |
|
@xing-yang: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
This is addressed by different PRs. Closing this one. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR moves Snapshot APIs from v1beta1 to v1.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: