kubernetes-csi / external-snapshotter

Sidecar container that watches Kubernetes Snapshot CRD objects and triggers CreateSnapshot/DeleteSnapshot against a CSI endpoint.
Apache License 2.0
501 stars 374 forks source link

Allow changing the UID part of the volumeGroupSnapshotRef field #1178

Closed leonardoce closed 2 weeks ago

leonardoce commented 3 weeks ago

When statically binding a VolumeGroupSnapshot with a VolumeGroupSnapshotContent, the code sets the uid field.

This was not allowed by the CEL validation rules that were imposing a strong immutability on that field.

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change /kind bug /kind cleanup /kind design /kind documentation /kind failing-test /kind feature /kind flake

What this PR does / why we need it:

This PR allows changing the VolumeGroupSnapshotContent.spec.volumeGroupSnapshotRef.uid field during the binding of statically provisioned VolumeGroupSnapshot and VolumeGroupSnapshotContent.

It was currently disallowed by a CEL transition rule.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

The `VolumeGroupSnapshotContent.spec.volumeGroupSnapshotRef.uid` field is now mutable. The snapshot controller needs this to bind statically-provisioned VolumeGroupSnapshot and VolumeGroupSnapshotContents correctly.
k8s-ci-robot commented 3 weeks ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: leonardoce Once this PR has been reviewed and has the lgtm label, please assign msau42 for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-csi/external-snapshotter/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
leonardoce commented 3 weeks ago

cc: @xing-yang

leonardoce commented 3 weeks ago

This may be related to #1153

leonardoce commented 2 weeks ago

Closing in favor or #1184