Repository navigation
fix(csi): also grant patch on VolumeSnapshots to external-provisioner - #222
Merged
Merged
Conversation
external-provisioner protects the source VolumeSnapshot with a finalizer while it restores a volume from it. Upstream writes that finalizer with an Update of the whole object; a build may instead patch metadata.finalizers only, which is what the storage-foundation build now does, because an Update through the typed VolumeSnapshot drops fields a CRD adds to spec. The rule granted get, list, watch and update since #221, so a provisioner that patches is refused. It now grants patch as well, and serves both kinds of provisioner build. Bump chart version to 1.72.26. Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
duckhawk
force-pushed
the
fix/csi-provisioner-patch-volumesnapshots
branch
from
September 29, 2026 16:37
579e427 to
d637617
Compare
krpsh123
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
helm_lib_csi_controller_rbac: the external-provisioner rule onvolumesnapshotsalso grantspatch. It is nowget,list,watch,update,patch. Chart version 1.72.26.Why do we need it, and what problem does it solve?
#221 granted
updateso that external-provisioner v6.3.0 can protect the source VolumeSnapshot with a finalizer while it restores a volume from it. Upstream writes that finalizer with an Update of the whole typed object.That Update drops any field a VolumeSnapshot CRD adds to
spec, because the typed VolumeSnapshot does not know it. The storage-foundation CRD addsspec.mode, with a default ofCaptureand an immutability rule, so the Update is rejected for a VolumeSnapshot inmode: Import:VolumeSnapshot.snapshot.storage.k8s.io "<name>" is invalid: spec.mode: Invalid value: "string": mode is immutableBecause of this, the storage-foundation build of the provisioner now writes the finalizer as a JSON merge patch of
metadata.finalizersonly (storage-foundation MR !173). The rule has to allow that write, so it now grantspatchnext toupdate. Both kinds of provisioner build keep working. Which build a module runs against is settled by the module's dependencies, not by this library.What is the expected result?
Checklist