-
Notifications
You must be signed in to change notification settings - Fork 402
Deprecate VolumeGroupSnapshot v1beta1, address API review comments #1337
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
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
e00864c
to
742cf00
Compare
/assign @xing-yang |
Signed-off-by: Leonardo Cecchi <[email protected]>
742cf00
to
119cfa7
Compare
/assign @msau42 |
client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml
Outdated
Show resolved
Hide resolved
For VolumeGroupSnapshotRef in VolumeGroupSnapshotContentSpec, we can't make VolumeGroupSnapshotRef itself immutable because name and namespace are set by the admin and UID is set by the controller for static provisioning. |
Signed-off-by: Leonardo Cecchi <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: leonardoce The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Leonardo Cecchi <[email protected]>
I added a CEL rule for that. |
// "Delete" means that the VolumeGroupSnapshotContent and its physical group | ||
// snapshot on underlying storage system are deleted. | ||
// Required. | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="deletionPolicy is immutable once set" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do allow users to change the deletion policy for SC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we allow that? I didn't know we can modify SC at all.
I thought it is the ReclaimPolicy in PV that we can change.
// VolumeGroupSnapshot and VolumeGroupSnapshotContent objects is successful | ||
// (by validating that both VolumeGroupSnapshot and VolumeGroupSnapshotContent | ||
// point at each other) before using this object. | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="boundVolumeGroupSnapshotContentName is immutable once set" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not actually sure, but does this handle the scenario where we need to set it the first time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, it is immutable after it is set.
Do we have tests running for the groupsnapshot functionality? |
Yes, we added e2e test before moving group snapshot to v1beta1. |
@leonardoce can you add cel tests for changes you made in this PR? https://github.com/kubernetes-csi/external-snapshotter/tree/master/client/hack/cel-tests |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Addresses API review comments in #1312
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: