Skip to content

Move snapshot APIs from v1beta1 to v1#389

Closed
xing-yang wants to merge 2 commits intokubernetes-csi:masterfrom
xing-yang:api_v1
Closed

Move snapshot APIs from v1beta1 to v1#389
xing-yang wants to merge 2 commits intokubernetes-csi:masterfrom
xing-yang:api_v1

Conversation

@xing-yang
Copy link
Copy Markdown
Collaborator

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?:

Move Snapshot APIs to V1.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 5, 2020
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 5, 2020
@xing-yang
Copy link
Copy Markdown
Collaborator Author

xing-yang commented Oct 5, 2020

/assign @yuxiangqian

@xing-yang
Copy link
Copy Markdown
Collaborator Author

xing-yang commented Oct 5, 2020

Note: Changes to tighten the validation is not done yet.

@xing-yang xing-yang force-pushed the api_v1 branch 2 times, most recently from 9da3a7b to 5875e1d Compare October 7, 2020 04:00
@yuxiangqian
Copy link
Copy Markdown
Contributor

per offline discussion, this PR will need further refinement.
In order to move to snapshot API to V1, a transition period is needed, more details can be found in this KEP. In short:
phase 1: introducing validation webhook service, no API change (this has been done)
phase 2: CRD have both v1beta1 and v1 schema, v1beta1 stored in API server, serving both v1 and v1beta1
phase 3: v1 stored (potentially might still need to serve both v1 & v1beta1)

@xing-yang xing-yang changed the title WIP: Move snapshot APIs from v1beta1 to v1 Move snapshot APIs from v1beta1 to v1 Oct 8, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 8, 2020
@xing-yang
Copy link
Copy Markdown
Collaborator Author

per offline discussion, this PR will need further refinement.
In order to move to snapshot API to V1, a transition period is needed, more details can be found in this KEP. In short:
phase 1: introducing validation webhook service, no API change (this has been done)
phase 2: CRD have both v1beta1 and v1 schema, v1beta1 stored in API server, serving both v1 and v1beta1
phase 3: v1 stored (potentially might still need to serve both v1 & v1beta1)

@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.


// name of the VolumeSnapshotClass to which this snapshot belongs.
// +optional
VolumeSnapshotClassName *string `json:"volumeSnapshotClassName,omitempty" protobuf:"bytes,4,opt,name=volumeSnapshotClassName"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll take a look.

@xing-yang xing-yang force-pushed the api_v1 branch 5 times, most recently from 5657e86 to 3a2029d Compare October 24, 2020 02:21
Copy link
Copy Markdown
Contributor

@yuxiangqian yuxiangqian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nits, overall looks good! thanks Xing

@xing-yang
Copy link
Copy Markdown
Collaborator Author

@saad-ali @msau42 @yuxiangqian addressed your comments. PTAL.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

k8s-ci-robot commented Nov 2, 2020

@xing-yang: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-csi-external-snapshotter-unit 674e840 link /test pull-kubernetes-csi-external-snapshotter-unit

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.

Details

Instructions 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.

@xing-yang
Copy link
Copy Markdown
Collaborator Author

Note: unit test failed because I manually modified release-tools to install the V1 snapshot CRDs.

@xing-yang
Copy link
Copy Markdown
Collaborator Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 3, 2020
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 12, 2020
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@xing-yang: PR needs rebase.

Details

Instructions 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.

@xing-yang
Copy link
Copy Markdown
Collaborator Author

This is addressed by different PRs. Closing this one.

@xing-yang xing-yang closed this Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants