You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
In v7.0.1 since prevent-volume-mode-conversion is enabled by default, the created volumesnapshotcotent sets its spec.SourceVolumeMode by inheriting value from the source PVC, so it must not be nil. On the other hand, in v7.0.1, there is a change #1005 where the webhook fails the validation of updating volumesnapshotcotent if oldSnapcontent.Spec.SourceVolumeMode != nil && newSnapcontent.Spec.SourceVolumeMode == nil.
However, it is possible that for a client that is using an older version of external-snapshotter API, spec.SourceVolumeMode field does not exist in volumesnapshotcotent's spec. If the Update method is called through this old client, it falls into oldSnapcontent.Spec.SourceVolumeMode != nil && newSnapcontent.Spec.SourceVolumeMode == nil, as a result, the Update will fail.
What you expected to happen:
Update method should succeed even spec.SourceVolumeMode is not defined
What happened:
In v7.0.1 since
prevent-volume-mode-conversion
is enabled by default, the created volumesnapshotcotent sets itsspec.SourceVolumeMode
by inheriting value from the source PVC, so it must not be nil. On the other hand, in v7.0.1, there is a change #1005 where the webhook fails the validation of updating volumesnapshotcotent ifoldSnapcontent.Spec.SourceVolumeMode != nil && newSnapcontent.Spec.SourceVolumeMode == nil
.However, it is possible that for a client that is using an older version of external-snapshotter API,
spec.SourceVolumeMode
field does not exist in volumesnapshotcotent's spec. If the Update method is called through this old client, it falls intooldSnapcontent.Spec.SourceVolumeMode != nil && newSnapcontent.Spec.SourceVolumeMode == nil
, as a result, the Update will fail.What you expected to happen:
Update method should succeed even
spec.SourceVolumeMode
is not definedHow to reproduce it:
See Velero issue vmware-tanzu/velero#7433
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: