Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VolumeSnapshot CRD version to v1beta #139

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

xing-yang
Copy link
Collaborator

What type of PR is this?
/kind api-change

What this PR does / why we need it:
This PR changes VolumeSnapshot CRD version from v1alpha1 to v1beta1.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Changes VolumeSnapshot CRD version from v1alpha1 to v1beta1.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Jul 11, 2019
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 11, 2019
@xing-yang xing-yang removed the request for review from saad-ali July 11, 2019 19:35
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 11, 2019
@msau42
Copy link
Collaborator

msau42 commented Jul 11, 2019

/assign @msau42 @saad-ali

@xing-yang
Copy link
Collaborator Author

/retest

@msau42
Copy link
Collaborator

msau42 commented Jul 31, 2019

/label api-review

@k8s-ci-robot k8s-ci-robot added the api-review Categorizes an issue or PR as actively needing an API review. label Jul 31, 2019
@johnbelamaric
Copy link

See https://github.com/kubernetes-sigs/controller-tools for CRD generation from types.go

Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

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

First round of reviews with @thockin

cmd/csi-snapshotter/create_crd.go Outdated Show resolved Hide resolved
cmd/csi-snapshotter/create_crd.go Outdated Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

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

Round 2 of feedback

pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
pkg/apis/volumesnapshot/v1beta1/types.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 23, 2019
Copy link
Collaborator

@msau42 msau42 left a comment

Choose a reason for hiding this comment

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

I'm not done yet, will need to finish the rest on Monday

config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml Outdated Show resolved Hide resolved
config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml Outdated Show resolved Hide resolved
@msau42
Copy link
Collaborator

msau42 commented Aug 23, 2019

General comment, I believe in the description, when we refer to field names, we should follow the casing used in the open schema.

@yuxiangqian yuxiangqian force-pushed the beta branch 2 times, most recently from 0db4142 to 280d275 Compare August 27, 2019 00:38
Copy link
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.

making another round of comment refinement based on feedback

config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml Outdated Show resolved Hide resolved
type: string
type: object
readyToUse:
description: 'readyToUse is a status/informational flag which provides
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this flag means more than underlying storage snapshot is available. It also means the binding has been successfully done.
for the implementation detail piece, it was requested during the review. I think it is beneficial to keep it for developer references.

config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml Outdated Show resolved Hide resolved
config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml Outdated Show resolved Hide resolved
@xing-yang
Copy link
Collaborator Author

In VolumeSnapshotSpec, we have "VolumeSnapshotClassName".
In VolumeSnapshotContentSpec, we have "SnapshotClassName".
Can we be consistent and name both "VolumeSnapshotClassName"?

@yuxiangqian
Copy link
Contributor

In VolumeSnapshotSpec, we have "VolumeSnapshotClassName".
In VolumeSnapshotContentSpec, we have "SnapshotClassName".
Can we be consistent and name both "VolumeSnapshotClassName"?

good catch, updated to use "VolumeSnapshotClassName" everywhere.

// In dynamic snapshot creation case, it will be filled in upon snapshot creation
// with the "creation_time" field returned from CSI "CreateSnapshot" gRPC call.
// For a pre-existing snapshot, it will be set to the "size_bytes" value returned
// from the CSI "ListSnapshots" gRPC call if the driver exists and supports it
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you follow the same wording as in the VolumeSnapshotContent object for these fields?

Copy link
Contributor

Choose a reason for hiding this comment

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

Having the same wording in both places may introduce other confusions.
i.e., CreationTime field in content status is an int64 which represents the epoch time of the snapshot cutting, in Snapshot status, its a datatime object for user readability.
RestoreSize in content status is an int64, where in Snapshot status its a resource.Quantity
another thing would be "binding" condition, for content status, it will be updated as long as driver supports, but for VolumeSnapshot status, it will only get updated after binding happened.

Copy link
Contributor

Choose a reason for hiding this comment

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

chatted offline with @msau42 , she meant only the CSI pieces not the entire block. will update.

listKind: VolumeSnapshotClassList
plural: volumesnapshotclasses
singular: volumesnapshotclass
scope: Cluster
Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean to test that this v1beta1 schema is compatible with v1. Can we temporarily convert this to v1 and try it on a 1.16 cluster?

@msau42
Copy link
Collaborator

msau42 commented Oct 24, 2019

Can you also write up a quick README on how to make API changes? I assume we need to invoke some tools after modifying types.go.

@msau42
Copy link
Collaborator

msau42 commented Oct 24, 2019

Structurally, I would like to move the api and generated clients outside of "pkg". We can do that as a separate pr: #186

Copy link
Collaborator

@msau42 msau42 left a comment

Choose a reason for hiding this comment

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

Just one nit from me

source:
description: source specifies from where a snapshot will be created.
This field is immutable after creation. Required.
properties:
snapshotHandle:
description: snapshotHandle specifies the CSI name of a pre-existing
description: snapshotHandle specifies the "snapshot_id" of a pre-existing
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we specify this is the CSI snapshot_id? ditto everywhere

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the context should provide enough information?
I can add if that sound more clear. LMK

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah let's just quickly clarify that this is the CSI field since all the other fields we say which csi call it's from

Copy link
Contributor

Choose a reason for hiding this comment

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

updated.

type: string
volumeHandle:
description: volumeHandle specifies the CSI name of the volume from
which a snapshot should be dynamically taken from. This field
description: volumeHandle specifies the "volume_id" of the volume
Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry, also specify "CSI" here too (and everywhere else snapshot_id, or volume_id) is used

@msau42
Copy link
Collaborator

msau42 commented Oct 24, 2019

also please squash commits

preserveUnknownField set to false, comments updates, adding pull request annotation
more comment updates
VolumeSnapshot comments
rename to VolumeSnapshotClassName
adding license
@yuxiangqian
Copy link
Contributor

yuxiangqian commented Oct 24, 2019

updated and squashed. Anything more before I do a final push? @msau42

@msau42
Copy link
Collaborator

msau42 commented Oct 24, 2019

/lgtm
/approve
Thanks so much for all the hard work!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 24, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msau42, xing-yang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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 merged commit bc6e42d into kubernetes-csi:master Oct 24, 2019
@yuxiangqian
Copy link
Contributor

thanks @msau42! now let's move to splitting controllers.

@xing-yang
Copy link
Collaborator Author

Awesome! Thanks @msau42!

pohly added a commit to pohly/external-snapshotter that referenced this pull request Mar 24, 2021
a1e1127 Merge pull request kubernetes-csi#139 from pohly/kind-for-kubernetes-latest
1c0fb09 prow.sh: use KinD main for latest Kubernetes
1d77cfc Merge pull request kubernetes-csi#138 from pohly/kind-update-0.10
bff2fb7 prow.sh: KinD 0.10.0

git-subtree-dir: release-tools
git-subtree-split: a1e1127
ggriffiths pushed a commit to ggriffiths/external-snapshotter that referenced this pull request Apr 15, 2021
bc0504a Merge pull request kubernetes-csi#140 from jsafrane/remove-unused-k8s-libs
5b1de1a go-get-kubernetes.sh: remove unused k8s libs
49b4269 Merge pull request kubernetes-csi#120 from pohly/add-kubernetes-release
a1e1127 Merge pull request kubernetes-csi#139 from pohly/kind-for-kubernetes-latest
1c0fb09 prow.sh: use KinD main for latest Kubernetes
1d77cfc Merge pull request kubernetes-csi#138 from pohly/kind-update-0.10
bff2fb7 prow.sh: KinD 0.10.0
95eac33 Merge pull request kubernetes-csi#137 from pohly/fix-go-version-check
437e431 verify-go-version.sh: fix check after removal of travis.yml
1748b16 Merge pull request kubernetes-csi#136 from pohly/go-1.16
ec844ea remove travis.yml, Go 1.16
df76aba Merge pull request kubernetes-csi#134 from andyzhangx/add-build-arg
e314a56 add build-arg ARCH for building multi-arch images, e.g. ARG ARCH FROM k8s.gcr.io/build-image/debian-base-${ARCH}:v2.1.3
7bc70e5 Merge pull request kubernetes-csi#129 from pohly/squash-documentation
e0b02e7 README.md: document usage of --squash
316cb95 Merge pull request kubernetes-csi#132 from yiyang5055/bugfix/boilerplate
26e2ab1 fix: default boilerplate path
1add8c1 Merge pull request kubernetes-csi#133 from pohly/kubernetes-1.20-tag
3e811d6 prow.sh: fix "on-master" prow jobs
1d60e77 Merge pull request kubernetes-csi#131 from pohly/kubernetes-1.20-tag
9f10459 prow.sh: support building Kubernetes for a specific version
f7e7ee4 docs: steps for adding testing against new Kubernetes release
fe1f284 Merge pull request kubernetes-csi#121 from kvaps/namespace-check
8fdf0f7 Merge pull request kubernetes-csi#128 from fengzixu/master
1c94220 fix: fix a bug of csi-sanity
a4c41e6 Merge pull request kubernetes-csi#127 from pohly/fix-boilerplate
ece0f50 check namespace for snapshot-controller
dbd8967 verify-boilerplate.sh: fix path to script
9289fd1 Merge pull request kubernetes-csi#125 from sachinkumarsingh092/optional-spelling-boilerplate-checks
ad29307 Make the spelling and boilerplate checks optional
5f06d02 Merge pull request kubernetes-csi#124 from sachinkumarsingh092/fix-spellcheck-boilerplate-tests
48186eb Fix spelling and boilerplate errors
71690af Merge pull request kubernetes-csi#122 from sachinkumarsingh092/include-spellcheck-boilerplate-tests
981be3f Adding spelling and boilerplate checks.
2bb7525 Merge pull request kubernetes-csi#117 from fengzixu/master
4ab8b15 use the tag to replace commit of csi-test
5d74e45 change the csi-test import path to v4
7dcd0a9 upgrade csi-test to v4.0.2

git-subtree-dir: release-tools
git-subtree-split: bc0504a
xing-yang pushed a commit to xing-yang/external-snapshotter that referenced this pull request Jul 26, 2021
…latest

prow.sh: use KinD main for latest Kubernetes
dobsonj pushed a commit to dobsonj/external-snapshotter that referenced this pull request Mar 8, 2024
STOR-1700: Rebase `external-snapshotter` to v7.0.0 to get VolumeGroupSnapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. 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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

9 participants