Description of problem: Currently csi-snapshot-controller-operator installs the snapshot CRDs for v1 version, when creating volumesnapshot instance with v1 version, the validation-webhook still checks the v1beta1 version and report: Error from server: error when creating "temp.yaml": admission webhook "volumesnapshotclasses.snapshot.storage.k8s.io" denied the request: expect resource to be {snapshot.storage.k8s.io v1beta1 volumesnapshots} or {snapshot.storage.k8s.io v1beta1 volumesnapshotcontents} Version-Release number of selected component (if applicable): 4.7.0-0.nightly-2020-12-13-224840 How reproducible: Always Steps to Reproduce: 1. Install aws cluster 2. Create volumesnapshotclass instance with "v1" successfully 3. Create volumesnapshot instance with "v1" failed $ more temp.yaml apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: mysnapshot spec: volumeSnapshotClassName: csi-aws-ebs-snapclass source: persistentVolumeClaimName: mypvc-ori $ oc create -f temp.yaml Error from server: error when creating "temp.yaml": admission webhook "volumesnapshotclasses.snapshot.storage.k8s.io" denied the request: expect resource to be {snapshot.storage.k8s.io v1beta1 volumesnapshots} or {snapshot.storage.k8s.io v1beta1 volumesnapshotcontents} Actual results: volumesnapshot instance created failed. Expected results: volumesnapshot instance should be created successfully.
We must support both snapshot.storage.k8s.io/v1 and v1beta1 for couple of releases. I admit that the snapshot webhook does not allow snapshot.storage.k8s.io/v1 yet, because external-snapshotter was not rebased to Kubernetes 1.20 version. We're waiting for upstream release.
If the webhook does not support snapshot.storage.k8s.io/v1, all the update(patch) options to volumesnapshot and volumesnapshotcontent will be rejected.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633